@wordpress/block-editor 15.15.0 → 15.16.1-next.v.202604091042.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/build/components/autocomplete/index.cjs +1 -2
- package/build/components/autocomplete/index.cjs.map +3 -3
- package/build/components/block-inspector/index.cjs +2 -1
- package/build/components/block-inspector/index.cjs.map +2 -2
- package/build/components/block-list/block-crash-warning.cjs +4 -2
- package/build/components/block-list/block-crash-warning.cjs.map +2 -2
- package/build/components/block-list/block-html.cjs +6 -2
- package/build/components/block-list/block-html.cjs.map +2 -2
- package/build/components/block-mover/button.cjs +4 -3
- package/build/components/block-mover/button.cjs.map +2 -2
- package/build/components/block-mover/index.cjs +1 -8
- package/build/components/block-mover/index.cjs.map +2 -2
- package/build/components/block-visibility/modal.cjs +2 -2
- package/build/components/block-visibility/modal.cjs.map +1 -1
- package/build/components/block-visibility/viewport-visibility-info.cjs +6 -1
- package/build/components/block-visibility/viewport-visibility-info.cjs.map +2 -2
- package/build/components/global-styles/background-panel.cjs +142 -33
- package/build/components/global-styles/background-panel.cjs.map +2 -2
- package/build/components/global-styles/color-panel.cjs +18 -7
- package/build/components/global-styles/color-panel.cjs.map +2 -2
- package/build/components/global-styles/hooks.cjs +8 -4
- package/build/components/global-styles/hooks.cjs.map +2 -2
- package/build/components/iframe/get-compatibility-styles.cjs +1 -1
- package/build/components/iframe/get-compatibility-styles.cjs.map +2 -2
- package/build/components/inserter/media-tab/hooks.cjs +1 -1
- package/build/components/inserter/media-tab/hooks.cjs.map +2 -2
- package/build/components/inspector-controls-tabs/styles-tab.cjs +2 -1
- package/build/components/inspector-controls-tabs/styles-tab.cjs.map +2 -2
- package/build/components/link-control/search-input.cjs +1 -1
- package/build/components/link-control/search-input.cjs.map +2 -2
- package/build/components/link-picker/link-preview.cjs +2 -1
- package/build/components/link-picker/link-preview.cjs.map +3 -3
- package/build/components/rich-text/index.cjs +1 -1
- package/build/components/rich-text/index.cjs.map +2 -2
- package/build/components/rich-text/input-event.cjs +3 -3
- package/build/components/rich-text/input-event.cjs.map +2 -2
- package/build/components/use-on-block-drop/index.cjs +1 -1
- package/build/components/use-on-block-drop/index.cjs.map +2 -2
- package/build/components/use-paste-styles/index.cjs +2 -2
- package/build/components/use-paste-styles/index.cjs.map +2 -2
- package/build/hooks/background.cjs +74 -21
- package/build/hooks/background.cjs.map +3 -3
- package/build/hooks/block-style-variation.cjs +5 -6
- package/build/hooks/block-style-variation.cjs.map +3 -3
- package/build/hooks/cross-origin-isolation.cjs +6 -6
- package/build/hooks/cross-origin-isolation.cjs.map +2 -2
- package/build/hooks/custom-css.cjs +5 -0
- package/build/hooks/custom-css.cjs.map +2 -2
- package/build/hooks/fit-text.cjs +46 -58
- package/build/hooks/fit-text.cjs.map +3 -3
- package/build/hooks/index.cjs +2 -2
- package/build/hooks/index.cjs.map +2 -2
- package/build/hooks/utils.cjs +5 -1
- package/build/hooks/utils.cjs.map +2 -2
- package/build/private-apis.cjs +1 -1
- package/build/private-apis.cjs.map +1 -1
- package/build/store/actions.cjs +8 -12
- package/build/store/actions.cjs.map +2 -2
- package/build/store/private-selectors.cjs +2 -2
- package/build/store/private-selectors.cjs.map +2 -2
- package/build/store/reducer.cjs +112 -146
- package/build/store/reducer.cjs.map +2 -2
- package/build/store/selectors.cjs +14 -15
- package/build/store/selectors.cjs.map +2 -2
- package/build/store/utils.cjs +1 -1
- package/build/store/utils.cjs.map +2 -2
- package/build/utils/pasting.cjs +1 -1
- package/build/utils/pasting.cjs.map +2 -2
- package/build-module/components/autocomplete/index.mjs +1 -2
- package/build-module/components/autocomplete/index.mjs.map +2 -2
- package/build-module/components/block-inspector/index.mjs +2 -1
- package/build-module/components/block-inspector/index.mjs.map +2 -2
- package/build-module/components/block-list/block-crash-warning.mjs +4 -2
- package/build-module/components/block-list/block-crash-warning.mjs.map +2 -2
- package/build-module/components/block-list/block-html.mjs +7 -3
- package/build-module/components/block-list/block-html.mjs.map +2 -2
- package/build-module/components/block-mover/button.mjs +4 -3
- package/build-module/components/block-mover/button.mjs.map +2 -2
- package/build-module/components/block-mover/index.mjs +1 -8
- package/build-module/components/block-mover/index.mjs.map +2 -2
- package/build-module/components/block-visibility/modal.mjs +2 -2
- package/build-module/components/block-visibility/modal.mjs.map +1 -1
- package/build-module/components/block-visibility/viewport-visibility-info.mjs +6 -1
- package/build-module/components/block-visibility/viewport-visibility-info.mjs.map +2 -2
- package/build-module/components/global-styles/background-panel.mjs +141 -34
- package/build-module/components/global-styles/background-panel.mjs.map +2 -2
- package/build-module/components/global-styles/color-panel.mjs +17 -7
- package/build-module/components/global-styles/color-panel.mjs.map +2 -2
- package/build-module/components/global-styles/hooks.mjs +8 -4
- package/build-module/components/global-styles/hooks.mjs.map +2 -2
- package/build-module/components/iframe/get-compatibility-styles.mjs +1 -1
- package/build-module/components/iframe/get-compatibility-styles.mjs.map +2 -2
- package/build-module/components/inserter/media-tab/hooks.mjs +1 -1
- package/build-module/components/inserter/media-tab/hooks.mjs.map +2 -2
- package/build-module/components/inspector-controls-tabs/styles-tab.mjs +2 -1
- package/build-module/components/inspector-controls-tabs/styles-tab.mjs.map +2 -2
- package/build-module/components/link-control/search-input.mjs +1 -1
- package/build-module/components/link-control/search-input.mjs.map +2 -2
- package/build-module/components/link-picker/link-preview.mjs +2 -1
- package/build-module/components/link-picker/link-preview.mjs.map +2 -2
- package/build-module/components/rich-text/index.mjs +2 -2
- package/build-module/components/rich-text/index.mjs.map +2 -2
- package/build-module/components/rich-text/input-event.mjs +2 -2
- package/build-module/components/rich-text/input-event.mjs.map +2 -2
- package/build-module/components/use-on-block-drop/index.mjs +1 -1
- package/build-module/components/use-on-block-drop/index.mjs.map +2 -2
- package/build-module/components/use-paste-styles/index.mjs +2 -2
- package/build-module/components/use-paste-styles/index.mjs.map +2 -2
- package/build-module/hooks/background.mjs +76 -22
- package/build-module/hooks/background.mjs.map +2 -2
- package/build-module/hooks/block-style-variation.mjs +4 -5
- package/build-module/hooks/block-style-variation.mjs.map +2 -2
- package/build-module/hooks/cross-origin-isolation.mjs +6 -6
- package/build-module/hooks/cross-origin-isolation.mjs.map +2 -2
- package/build-module/hooks/custom-css.mjs +5 -0
- package/build-module/hooks/custom-css.mjs.map +2 -2
- package/build-module/hooks/fit-text.mjs +46 -58
- package/build-module/hooks/fit-text.mjs.map +2 -2
- package/build-module/hooks/index.mjs +2 -2
- package/build-module/hooks/index.mjs.map +2 -2
- package/build-module/hooks/utils.mjs +5 -1
- package/build-module/hooks/utils.mjs.map +2 -2
- package/build-module/private-apis.mjs +2 -2
- package/build-module/private-apis.mjs.map +1 -1
- package/build-module/store/actions.mjs +8 -12
- package/build-module/store/actions.mjs.map +2 -2
- package/build-module/store/private-selectors.mjs +2 -2
- package/build-module/store/private-selectors.mjs.map +2 -2
- package/build-module/store/reducer.mjs +112 -145
- package/build-module/store/reducer.mjs.map +2 -2
- package/build-module/store/selectors.mjs +14 -15
- package/build-module/store/selectors.mjs.map +2 -2
- package/build-module/store/utils.mjs +1 -1
- package/build-module/store/utils.mjs.map +2 -2
- package/build-module/utils/pasting.mjs +1 -1
- package/build-module/utils/pasting.mjs.map +2 -2
- package/build-style/content-rtl.css +2 -2
- package/build-style/content.css +2 -2
- package/build-style/style-rtl.css +35 -14
- package/build-style/style.css +35 -14
- package/package.json +38 -39
- package/src/autocompleters/style.scss +0 -8
- package/src/components/autocomplete/index.js +1 -2
- package/src/components/background-image-control/style.scss +0 -4
- package/src/components/block-draggable/test/helpers.native.js +1 -1
- package/src/components/block-inspector/index.js +1 -0
- package/src/components/block-list/block-crash-warning.js +3 -1
- package/src/components/block-list/block-crash-warning.native.js +3 -1
- package/src/components/block-list/block-html.js +13 -3
- package/src/components/block-mover/button.js +7 -4
- package/src/components/block-mover/index.js +1 -8
- package/src/components/block-visibility/viewport-visibility-info.js +8 -1
- package/src/components/fit-text-size-warning/style.scss +1 -5
- package/src/components/global-styles/background-panel.js +157 -11
- package/src/components/global-styles/color-panel.js +23 -7
- package/src/components/global-styles/hooks.js +12 -4
- package/src/components/global-styles/test/background-panel.js +44 -1
- package/src/components/iframe/get-compatibility-styles.js +1 -1
- package/src/components/inserter/media-tab/hooks.js +1 -1
- package/src/components/inspector-controls-tabs/styles-tab.js +1 -0
- package/src/components/link-control/README.md +2 -2
- package/src/components/link-control/search-input.js +1 -1
- package/src/components/link-picker/link-preview.js +2 -1
- package/src/components/rich-text/index.js +1 -1
- package/src/components/rich-text/index.native.js +1 -1
- package/src/components/rich-text/input-event.js +1 -1
- package/src/components/rich-text/input-event.native.js +1 -1
- package/src/components/rich-text/native/index.native.js +18 -17
- package/src/components/use-on-block-drop/index.js +1 -1
- package/src/components/use-paste-styles/index.js +2 -2
- package/src/hooks/background.js +122 -21
- package/src/hooks/background.scss +45 -0
- package/src/hooks/block-style-variation.js +3 -4
- package/src/hooks/cross-origin-isolation.js +6 -6
- package/src/hooks/custom-css.js +6 -0
- package/src/hooks/fit-text.js +73 -83
- package/src/hooks/index.js +1 -1
- package/src/hooks/test/cross-origin-isolation.js +7 -3
- package/src/hooks/utils.js +4 -0
- package/src/private-apis.js +2 -2
- package/src/store/actions.js +9 -16
- package/src/store/private-selectors.js +2 -2
- package/src/store/reducer.js +144 -193
- package/src/store/selectors.js +33 -23
- package/src/store/test/private-selectors.js +107 -71
- package/src/store/test/reducer.js +593 -152
- package/src/store/test/registry-selectors.js +1 -1
- package/src/store/test/selectors.js +345 -262
- package/src/store/utils.js +1 -1
- package/src/style.scss +1 -0
- package/src/utils/pasting.js +1 -1
- package/build/autocompleters/link.cjs +0 -81
- package/build/autocompleters/link.cjs.map +0 -7
- package/build-module/autocompleters/link.mjs +0 -50
- package/build-module/autocompleters/link.mjs.map +0 -7
- package/src/autocompleters/link.js +0 -63
|
@@ -112,7 +112,7 @@ var getAllPatternsDependants = (select) => (state) => {
|
|
|
112
112
|
};
|
|
113
113
|
var getInsertBlockTypeDependants = () => (state, rootClientId) => {
|
|
114
114
|
return [
|
|
115
|
-
state.blockListSettings
|
|
115
|
+
state.blockListSettings.get(rootClientId),
|
|
116
116
|
state.blocks.byClientId.get(rootClientId),
|
|
117
117
|
state.blocks.order.get(rootClientId || ""),
|
|
118
118
|
state.settings.allowedBlockTypes,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/store/utils.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { parse } from '@wordpress/blocks';\nimport { parse as grammarParse } from '@wordpress/block-serialization-default-parser';\n\n/**\n * Internal dependencies\n */\nimport { selectBlockPatternsKey } from './private-keys';\nimport { unlock } from '../lock-unlock';\nimport { STORE_NAME } from './constants';\nimport {\n\tgetSectionRootClientId,\n\tisSectionBlock,\n\tgetParentSectionBlock,\n} from './private-selectors';\nimport { getBlockEditingMode } from './selectors';\nimport { INSERTER_PATTERN_TYPES } from '../components/inserter/block-patterns-tab/utils';\n\nexport const isFiltered = Symbol( 'isFiltered' );\nconst parsedPatternCache = new WeakMap();\nconst grammarMapCache = new WeakMap();\n\nexport function mapUserPattern(\n\tuserPattern,\n\t__experimentalUserPatternCategories = []\n) {\n\treturn {\n\t\tname: `core/block/${ userPattern.id }`,\n\t\tid: userPattern.id,\n\t\ttype: INSERTER_PATTERN_TYPES.user,\n\t\ttitle: userPattern.title?.raw,\n\t\tcategories: userPattern.wp_pattern_category?.map( ( catId ) => {\n\t\t\tconst category = __experimentalUserPatternCategories.find(\n\t\t\t\t( { id } ) => id === catId\n\t\t\t);\n\t\t\treturn category ? category.slug : catId;\n\t\t} ),\n\t\tcontent: userPattern.content?.raw,\n\t\tsyncStatus: userPattern.wp_pattern_sync_status,\n\t};\n}\n\nfunction parsePattern( pattern ) {\n\tconst blocks = parse( pattern.content, {\n\t\t__unstableSkipMigrationLogs: true,\n\t} );\n\tif ( blocks.length === 1 ) {\n\t\tblocks[ 0 ].attributes = {\n\t\t\t...blocks[ 0 ].attributes,\n\t\t\tmetadata: {\n\t\t\t\t...( blocks[ 0 ].attributes.metadata || {} ),\n\t\t\t\tcategories: pattern.categories,\n\t\t\t\tpatternName: pattern.name,\n\t\t\t\tname: blocks[ 0 ].attributes.metadata?.name || pattern.title,\n\t\t\t},\n\t\t};\n\t}\n\treturn {\n\t\t...pattern,\n\t\tblocks,\n\t};\n}\n\nexport function getParsedPattern( pattern ) {\n\tlet parsedPattern = parsedPatternCache.get( pattern );\n\tif ( ! parsedPattern ) {\n\t\tparsedPattern = parsePattern( pattern );\n\t\tparsedPatternCache.set( pattern, parsedPattern );\n\t}\n\treturn parsedPattern;\n}\n\nexport function getGrammar( pattern ) {\n\tlet grammarMap = grammarMapCache.get( pattern );\n\tif ( ! grammarMap ) {\n\t\tgrammarMap = grammarParse( pattern.content );\n\t\t// Block names are null only at the top level for whitespace.\n\t\tgrammarMap = grammarMap.filter( ( block ) => block.blockName !== null );\n\t\tgrammarMapCache.set( pattern, grammarMap );\n\t}\n\treturn grammarMap;\n}\n\nexport const checkAllowList = ( list, item, defaultResult = null ) => {\n\tif ( typeof list === 'boolean' ) {\n\t\treturn list;\n\t}\n\tif ( Array.isArray( list ) ) {\n\t\t// TODO: when there is a canonical way to detect that we are editing a post\n\t\t// the following check should be changed to something like:\n\t\t// if ( list.includes( 'core/post-content' ) && getEditorMode() === 'post-content' && item === null )\n\t\tif ( list.includes( 'core/post-content' ) && item === null ) {\n\t\t\treturn true;\n\t\t}\n\t\treturn list.includes( item );\n\t}\n\treturn defaultResult;\n};\n\nexport const checkAllowListRecursive = ( blocks, allowedBlockTypes ) => {\n\tif ( typeof allowedBlockTypes === 'boolean' ) {\n\t\treturn allowedBlockTypes;\n\t}\n\n\tconst blocksQueue = [ ...blocks ];\n\twhile ( blocksQueue.length > 0 ) {\n\t\tconst block = blocksQueue.shift();\n\n\t\tconst isAllowed = checkAllowList(\n\t\t\tallowedBlockTypes,\n\t\t\tblock.name || block.blockName,\n\t\t\ttrue\n\t\t);\n\t\tif ( ! isAllowed ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tblock.innerBlocks?.forEach( ( innerBlock ) => {\n\t\t\tblocksQueue.push( innerBlock );\n\t\t} );\n\t}\n\n\treturn true;\n};\n\nexport const getAllPatternsDependants = ( select ) => ( state ) => {\n\treturn [\n\t\tstate.settings.__experimentalBlockPatterns,\n\t\tstate.settings.__experimentalUserPatternCategories,\n\t\tstate.settings.__experimentalReusableBlocks,\n\t\tstate.settings[ selectBlockPatternsKey ]?.( select ),\n\t\tstate.blockPatterns,\n\t\tunlock( select( STORE_NAME ) ).getReusableBlocks(),\n\t];\n};\n\nexport const getInsertBlockTypeDependants = () => ( state, rootClientId ) => {\n\treturn [\n\t\tstate.blockListSettings
|
|
5
|
-
"mappings": "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
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { parse } from '@wordpress/blocks';\nimport { parse as grammarParse } from '@wordpress/block-serialization-default-parser';\n\n/**\n * Internal dependencies\n */\nimport { selectBlockPatternsKey } from './private-keys';\nimport { unlock } from '../lock-unlock';\nimport { STORE_NAME } from './constants';\nimport {\n\tgetSectionRootClientId,\n\tisSectionBlock,\n\tgetParentSectionBlock,\n} from './private-selectors';\nimport { getBlockEditingMode } from './selectors';\nimport { INSERTER_PATTERN_TYPES } from '../components/inserter/block-patterns-tab/utils';\n\nexport const isFiltered = Symbol( 'isFiltered' );\nconst parsedPatternCache = new WeakMap();\nconst grammarMapCache = new WeakMap();\n\nexport function mapUserPattern(\n\tuserPattern,\n\t__experimentalUserPatternCategories = []\n) {\n\treturn {\n\t\tname: `core/block/${ userPattern.id }`,\n\t\tid: userPattern.id,\n\t\ttype: INSERTER_PATTERN_TYPES.user,\n\t\ttitle: userPattern.title?.raw,\n\t\tcategories: userPattern.wp_pattern_category?.map( ( catId ) => {\n\t\t\tconst category = __experimentalUserPatternCategories.find(\n\t\t\t\t( { id } ) => id === catId\n\t\t\t);\n\t\t\treturn category ? category.slug : catId;\n\t\t} ),\n\t\tcontent: userPattern.content?.raw,\n\t\tsyncStatus: userPattern.wp_pattern_sync_status,\n\t};\n}\n\nfunction parsePattern( pattern ) {\n\tconst blocks = parse( pattern.content, {\n\t\t__unstableSkipMigrationLogs: true,\n\t} );\n\tif ( blocks.length === 1 ) {\n\t\tblocks[ 0 ].attributes = {\n\t\t\t...blocks[ 0 ].attributes,\n\t\t\tmetadata: {\n\t\t\t\t...( blocks[ 0 ].attributes.metadata || {} ),\n\t\t\t\tcategories: pattern.categories,\n\t\t\t\tpatternName: pattern.name,\n\t\t\t\tname: blocks[ 0 ].attributes.metadata?.name || pattern.title,\n\t\t\t},\n\t\t};\n\t}\n\treturn {\n\t\t...pattern,\n\t\tblocks,\n\t};\n}\n\nexport function getParsedPattern( pattern ) {\n\tlet parsedPattern = parsedPatternCache.get( pattern );\n\tif ( ! parsedPattern ) {\n\t\tparsedPattern = parsePattern( pattern );\n\t\tparsedPatternCache.set( pattern, parsedPattern );\n\t}\n\treturn parsedPattern;\n}\n\nexport function getGrammar( pattern ) {\n\tlet grammarMap = grammarMapCache.get( pattern );\n\tif ( ! grammarMap ) {\n\t\tgrammarMap = grammarParse( pattern.content );\n\t\t// Block names are null only at the top level for whitespace.\n\t\tgrammarMap = grammarMap.filter( ( block ) => block.blockName !== null );\n\t\tgrammarMapCache.set( pattern, grammarMap );\n\t}\n\treturn grammarMap;\n}\n\nexport const checkAllowList = ( list, item, defaultResult = null ) => {\n\tif ( typeof list === 'boolean' ) {\n\t\treturn list;\n\t}\n\tif ( Array.isArray( list ) ) {\n\t\t// TODO: when there is a canonical way to detect that we are editing a post\n\t\t// the following check should be changed to something like:\n\t\t// if ( list.includes( 'core/post-content' ) && getEditorMode() === 'post-content' && item === null )\n\t\tif ( list.includes( 'core/post-content' ) && item === null ) {\n\t\t\treturn true;\n\t\t}\n\t\treturn list.includes( item );\n\t}\n\treturn defaultResult;\n};\n\nexport const checkAllowListRecursive = ( blocks, allowedBlockTypes ) => {\n\tif ( typeof allowedBlockTypes === 'boolean' ) {\n\t\treturn allowedBlockTypes;\n\t}\n\n\tconst blocksQueue = [ ...blocks ];\n\twhile ( blocksQueue.length > 0 ) {\n\t\tconst block = blocksQueue.shift();\n\n\t\tconst isAllowed = checkAllowList(\n\t\t\tallowedBlockTypes,\n\t\t\tblock.name || block.blockName,\n\t\t\ttrue\n\t\t);\n\t\tif ( ! isAllowed ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tblock.innerBlocks?.forEach( ( innerBlock ) => {\n\t\t\tblocksQueue.push( innerBlock );\n\t\t} );\n\t}\n\n\treturn true;\n};\n\nexport const getAllPatternsDependants = ( select ) => ( state ) => {\n\treturn [\n\t\tstate.settings.__experimentalBlockPatterns,\n\t\tstate.settings.__experimentalUserPatternCategories,\n\t\tstate.settings.__experimentalReusableBlocks,\n\t\tstate.settings[ selectBlockPatternsKey ]?.( select ),\n\t\tstate.blockPatterns,\n\t\tunlock( select( STORE_NAME ) ).getReusableBlocks(),\n\t];\n};\n\nexport const getInsertBlockTypeDependants = () => ( state, rootClientId ) => {\n\treturn [\n\t\tstate.blockListSettings.get( rootClientId ),\n\t\tstate.blocks.byClientId.get( rootClientId ),\n\t\tstate.blocks.order.get( rootClientId || '' ),\n\t\tstate.settings.allowedBlockTypes,\n\t\tstate.settings.templateLock,\n\t\tgetBlockEditingMode( state, rootClientId ),\n\t\tgetSectionRootClientId( state ),\n\t\tisSectionBlock( state, rootClientId ),\n\t\tgetParentSectionBlock( state, rootClientId ),\n\t];\n};\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/utils/pasting.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { getFilesFromDataTransfer } from '@wordpress/dom';\n\n/**\n * Normalizes a given string of HTML to remove the Windows-specific \"Fragment\"\n * comments and any preceding and trailing content.\n *\n * @param {string} html the html to be normalized\n * @return {string} the normalized html\n */\nfunction removeWindowsFragments( html ) {\n\tconst startStr = '<!--StartFragment-->';\n\tconst startIdx = html.indexOf( startStr );\n\tif ( startIdx > -1 ) {\n\t\thtml = html.substring( startIdx + startStr.length );\n\t} else {\n\t\t// No point looking for EndFragment\n\t\treturn html;\n\t}\n\n\tconst endStr = '<!--EndFragment-->';\n\tconst endIdx = html.indexOf( endStr );\n\tif ( endIdx > -1 ) {\n\t\thtml = html.substring( 0, endIdx );\n\t}\n\n\treturn html;\n}\n\n/**\n * Removes the charset meta tag inserted by Chromium.\n * See:\n * - https://github.com/WordPress/gutenberg/issues/33585\n * - https://bugs.chromium.org/p/chromium/issues/detail?id=1264616#c4\n *\n * @param {string} html the html to be stripped of the meta tag.\n * @return {string} the cleaned html\n */\nfunction removeCharsetMetaTag( html ) {\n\tconst metaTag = `<meta charset='utf-8'>`;\n\n\tif ( html.startsWith( metaTag ) ) {\n\t\treturn html.slice( metaTag.length );\n\t}\n\n\treturn html;\n}\n\nexport function getPasteEventData( { clipboardData } ) {\n\tlet plainText = '';\n\tlet html = '';\n\n\ttry {\n\t\tplainText = clipboardData.getData( 'text/plain' );\n\t\thtml = clipboardData.getData( 'text/html' );\n\t} catch
|
|
5
|
-
"mappings": ";AAGA,SAAS,gCAAgC;AASzC,SAAS,uBAAwB,MAAO;AACvC,QAAM,WAAW;AACjB,QAAM,WAAW,KAAK,QAAS,QAAS;AACxC,MAAK,WAAW,IAAK;AACpB,WAAO,KAAK,UAAW,WAAW,SAAS,MAAO;AAAA,EACnD,OAAO;AAEN,WAAO;AAAA,EACR;AAEA,QAAM,SAAS;AACf,QAAM,SAAS,KAAK,QAAS,MAAO;AACpC,MAAK,SAAS,IAAK;AAClB,WAAO,KAAK,UAAW,GAAG,MAAO;AAAA,EAClC;AAEA,SAAO;AACR;AAWA,SAAS,qBAAsB,MAAO;AACrC,QAAM,UAAU;AAEhB,MAAK,KAAK,WAAY,OAAQ,GAAI;AACjC,WAAO,KAAK,MAAO,QAAQ,MAAO;AAAA,EACnC;AAEA,SAAO;AACR;AAEO,SAAS,kBAAmB,EAAE,cAAc,GAAI;AACtD,MAAI,YAAY;AAChB,MAAI,OAAO;AAEX,MAAI;AACH,gBAAY,cAAc,QAAS,YAAa;AAChD,WAAO,cAAc,QAAS,WAAY;AAAA,EAC3C,
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { getFilesFromDataTransfer } from '@wordpress/dom';\n\n/**\n * Normalizes a given string of HTML to remove the Windows-specific \"Fragment\"\n * comments and any preceding and trailing content.\n *\n * @param {string} html the html to be normalized\n * @return {string} the normalized html\n */\nfunction removeWindowsFragments( html ) {\n\tconst startStr = '<!--StartFragment-->';\n\tconst startIdx = html.indexOf( startStr );\n\tif ( startIdx > -1 ) {\n\t\thtml = html.substring( startIdx + startStr.length );\n\t} else {\n\t\t// No point looking for EndFragment\n\t\treturn html;\n\t}\n\n\tconst endStr = '<!--EndFragment-->';\n\tconst endIdx = html.indexOf( endStr );\n\tif ( endIdx > -1 ) {\n\t\thtml = html.substring( 0, endIdx );\n\t}\n\n\treturn html;\n}\n\n/**\n * Removes the charset meta tag inserted by Chromium.\n * See:\n * - https://github.com/WordPress/gutenberg/issues/33585\n * - https://bugs.chromium.org/p/chromium/issues/detail?id=1264616#c4\n *\n * @param {string} html the html to be stripped of the meta tag.\n * @return {string} the cleaned html\n */\nfunction removeCharsetMetaTag( html ) {\n\tconst metaTag = `<meta charset='utf-8'>`;\n\n\tif ( html.startsWith( metaTag ) ) {\n\t\treturn html.slice( metaTag.length );\n\t}\n\n\treturn html;\n}\n\nexport function getPasteEventData( { clipboardData } ) {\n\tlet plainText = '';\n\tlet html = '';\n\n\ttry {\n\t\tplainText = clipboardData.getData( 'text/plain' );\n\t\thtml = clipboardData.getData( 'text/html' );\n\t} catch {\n\t\t// Some browsers like UC Browser paste plain text by default and\n\t\t// don't support clipboardData at all, so allow default\n\t\t// behaviour.\n\t\treturn;\n\t}\n\n\t// Remove Windows-specific metadata appended within copied HTML text.\n\thtml = removeWindowsFragments( html );\n\n\t// Strip meta tag.\n\thtml = removeCharsetMetaTag( html );\n\n\tconst files = getFilesFromDataTransfer( clipboardData );\n\n\tif ( files.length && ! shouldDismissPastedFiles( files, html ) ) {\n\t\treturn { files };\n\t}\n\n\treturn { html, plainText, files: [] };\n}\n\n/**\n * Given a collection of DataTransfer files and HTML and plain text strings,\n * determine whether the files are to be dismissed in favor of the HTML.\n *\n * Certain office-type programs, like Microsoft Word or Apple Numbers,\n * will, upon copy, generate a screenshot of the content being copied and\n * attach it to the clipboard alongside the actual rich text that the user\n * sought to copy. In those cases, we should let Gutenberg handle the rich text\n * content and not the screenshot, since this allows Gutenberg to insert\n * meaningful blocks, like paragraphs, lists or even tables.\n *\n * @param {File[]} files File objects obtained from a paste event\n * @param {string} html HTML content obtained from a paste event\n * @return {boolean} True if the files should be dismissed\n */\nexport function shouldDismissPastedFiles( files, html /*, plainText */ ) {\n\t// The question is only relevant when there is actual HTML content and when\n\t// there is exactly one image file.\n\tif (\n\t\thtml &&\n\t\tfiles?.length === 1 &&\n\t\tfiles[ 0 ].type.indexOf( 'image/' ) === 0\n\t) {\n\t\t// A single <img> tag found in the HTML source suggests that the\n\t\t// content being pasted revolves around an image. Sometimes there are\n\t\t// other elements found, like <figure>, but we assume that the user's\n\t\t// intention is to paste the actual image file.\n\t\tconst IMAGE_TAG = /<\\s*img\\b/gi;\n\t\tif ( html.match( IMAGE_TAG )?.length !== 1 ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Even when there is exactly one <img> tag in the HTML payload, we\n\t\t// choose to weed out local images, i.e. those whose source starts with\n\t\t// \"file://\". These payloads occur in specific configurations, such as\n\t\t// when copying an entire document from Microsoft Word, that contains\n\t\t// text and exactly one image, and pasting that content using Google\n\t\t// Chrome.\n\t\tconst IMG_WITH_LOCAL_SRC = /<\\s*img\\b[^>]*\\bsrc=\"file:\\/\\//i;\n\t\tif ( html.match( IMG_WITH_LOCAL_SRC ) ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}\n"],
|
|
5
|
+
"mappings": ";AAGA,SAAS,gCAAgC;AASzC,SAAS,uBAAwB,MAAO;AACvC,QAAM,WAAW;AACjB,QAAM,WAAW,KAAK,QAAS,QAAS;AACxC,MAAK,WAAW,IAAK;AACpB,WAAO,KAAK,UAAW,WAAW,SAAS,MAAO;AAAA,EACnD,OAAO;AAEN,WAAO;AAAA,EACR;AAEA,QAAM,SAAS;AACf,QAAM,SAAS,KAAK,QAAS,MAAO;AACpC,MAAK,SAAS,IAAK;AAClB,WAAO,KAAK,UAAW,GAAG,MAAO;AAAA,EAClC;AAEA,SAAO;AACR;AAWA,SAAS,qBAAsB,MAAO;AACrC,QAAM,UAAU;AAEhB,MAAK,KAAK,WAAY,OAAQ,GAAI;AACjC,WAAO,KAAK,MAAO,QAAQ,MAAO;AAAA,EACnC;AAEA,SAAO;AACR;AAEO,SAAS,kBAAmB,EAAE,cAAc,GAAI;AACtD,MAAI,YAAY;AAChB,MAAI,OAAO;AAEX,MAAI;AACH,gBAAY,cAAc,QAAS,YAAa;AAChD,WAAO,cAAc,QAAS,WAAY;AAAA,EAC3C,QAAQ;AAIP;AAAA,EACD;AAGA,SAAO,uBAAwB,IAAK;AAGpC,SAAO,qBAAsB,IAAK;AAElC,QAAM,QAAQ,yBAA0B,aAAc;AAEtD,MAAK,MAAM,UAAU,CAAE,yBAA0B,OAAO,IAAK,GAAI;AAChE,WAAO,EAAE,MAAM;AAAA,EAChB;AAEA,SAAO,EAAE,MAAM,WAAW,OAAO,CAAC,EAAE;AACrC;AAiBO,SAAS,yBAA0B,OAAO,MAAwB;AAGxE,MACC,QACA,OAAO,WAAW,KAClB,MAAO,CAAE,EAAE,KAAK,QAAS,QAAS,MAAM,GACvC;AAKD,UAAM,YAAY;AAClB,QAAK,KAAK,MAAO,SAAU,GAAG,WAAW,GAAI;AAC5C,aAAO;AAAA,IACR;AAQA,UAAM,qBAAqB;AAC3B,QAAK,KAAK,MAAO,kBAAmB,GAAI;AACvC,aAAO;AAAA,IACR;AAAA,EACD;AAEA,SAAO;AACR;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -199,7 +199,7 @@ _::-webkit-full-page-media, _:future, :root [data-has-multi-selection=true] .blo
|
|
|
199
199
|
outline-style: solid;
|
|
200
200
|
outline-width: calc(1 * var(--wp-admin-border-width-focus) / var(--wp-block-editor-iframe-zoom-out-scale, 1));
|
|
201
201
|
outline-offset: calc(1 * -1 * var(--wp-admin-border-width-focus) / var(--wp-block-editor-iframe-zoom-out-scale, 1));
|
|
202
|
-
box-shadow: inset 0 0 0 calc(var(--wp-admin-border-width-focus
|
|
202
|
+
box-shadow: inset 0 0 0 calc(1 * var(--wp-admin-border-width-focus) / var(--wp-block-editor-iframe-zoom-out-scale, 1) + 0.5px) rgba(255, 255, 255, 0.7);
|
|
203
203
|
z-index: 1;
|
|
204
204
|
}
|
|
205
205
|
.block-editor-block-list__layout .block-editor-block-list__block.is-block-hidden {
|
|
@@ -294,7 +294,7 @@ _::-webkit-full-page-media, _:future, :root [data-has-multi-selection=true] .blo
|
|
|
294
294
|
outline-style: solid;
|
|
295
295
|
outline-width: calc(1 * var(--wp-admin-border-width-focus) / var(--wp-block-editor-iframe-zoom-out-scale, 1));
|
|
296
296
|
outline-offset: calc(1 * -1 * var(--wp-admin-border-width-focus) / var(--wp-block-editor-iframe-zoom-out-scale, 1));
|
|
297
|
-
box-shadow: inset 0 0 0 calc(var(--wp-admin-border-width-focus
|
|
297
|
+
box-shadow: inset 0 0 0 calc(1 * var(--wp-admin-border-width-focus) / var(--wp-block-editor-iframe-zoom-out-scale, 1) + 0.5px) rgba(255, 255, 255, 0.7);
|
|
298
298
|
}
|
|
299
299
|
|
|
300
300
|
.is-outline-mode .block-editor-block-list__block:not(.remove-outline).wp-block-template-part.is-hovered::after, .is-outline-mode .block-editor-block-list__block:not(.remove-outline).wp-block-template-part.is-selected::after, .is-outline-mode .block-editor-block-list__block:not(.remove-outline).wp-block-template-part.is-highlighted::after,
|
package/build-style/content.css
CHANGED
|
@@ -199,7 +199,7 @@ _::-webkit-full-page-media, _:future, :root [data-has-multi-selection=true] .blo
|
|
|
199
199
|
outline-style: solid;
|
|
200
200
|
outline-width: calc(1 * var(--wp-admin-border-width-focus) / var(--wp-block-editor-iframe-zoom-out-scale, 1));
|
|
201
201
|
outline-offset: calc(1 * -1 * var(--wp-admin-border-width-focus) / var(--wp-block-editor-iframe-zoom-out-scale, 1));
|
|
202
|
-
box-shadow: inset 0 0 0 calc(var(--wp-admin-border-width-focus
|
|
202
|
+
box-shadow: inset 0 0 0 calc(1 * var(--wp-admin-border-width-focus) / var(--wp-block-editor-iframe-zoom-out-scale, 1) + 0.5px) rgba(255, 255, 255, 0.7);
|
|
203
203
|
z-index: 1;
|
|
204
204
|
}
|
|
205
205
|
.block-editor-block-list__layout .block-editor-block-list__block.is-block-hidden {
|
|
@@ -294,7 +294,7 @@ _::-webkit-full-page-media, _:future, :root [data-has-multi-selection=true] .blo
|
|
|
294
294
|
outline-style: solid;
|
|
295
295
|
outline-width: calc(1 * var(--wp-admin-border-width-focus) / var(--wp-block-editor-iframe-zoom-out-scale, 1));
|
|
296
296
|
outline-offset: calc(1 * -1 * var(--wp-admin-border-width-focus) / var(--wp-block-editor-iframe-zoom-out-scale, 1));
|
|
297
|
-
box-shadow: inset 0 0 0 calc(var(--wp-admin-border-width-focus
|
|
297
|
+
box-shadow: inset 0 0 0 calc(1 * var(--wp-admin-border-width-focus) / var(--wp-block-editor-iframe-zoom-out-scale, 1) + 0.5px) rgba(255, 255, 255, 0.7);
|
|
298
298
|
}
|
|
299
299
|
|
|
300
300
|
.is-outline-mode .block-editor-block-list__block:not(.remove-outline).wp-block-template-part.is-hovered::after, .is-outline-mode .block-editor-block-list__block:not(.remove-outline).wp-block-template-part.is-selected::after, .is-outline-mode .block-editor-block-list__block:not(.remove-outline).wp-block-template-part.is-highlighted::after,
|
|
@@ -116,17 +116,7 @@
|
|
|
116
116
|
color: inherit !important;
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
-
.block-editor-autocompleters__link {
|
|
120
|
-
white-space: nowrap;
|
|
121
|
-
}
|
|
122
|
-
.block-editor-autocompleters__link .block-editor-block-icon {
|
|
123
|
-
margin-left: 8px;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
119
|
.block-editor-global-styles-background-panel__inspector-media-replace-container {
|
|
127
|
-
border: 1px solid #ddd;
|
|
128
|
-
border-radius: 2px;
|
|
129
|
-
grid-column: 1/-1;
|
|
130
120
|
position: relative;
|
|
131
121
|
}
|
|
132
122
|
.block-editor-global-styles-background-panel__inspector-media-replace-container.is-open {
|
|
@@ -1622,10 +1612,7 @@ iframe[name=editor-canvas] {
|
|
|
1622
1612
|
}
|
|
1623
1613
|
|
|
1624
1614
|
.block-editor-fit-text-size-warning {
|
|
1625
|
-
|
|
1626
|
-
}
|
|
1627
|
-
.block-editor-fit-text-size-warning .components-notice__content {
|
|
1628
|
-
margin-left: 0;
|
|
1615
|
+
grid-column: span 2;
|
|
1629
1616
|
}
|
|
1630
1617
|
|
|
1631
1618
|
.components-font-appearance-control [role=option] {
|
|
@@ -3410,6 +3397,40 @@ iframe[name=editor-canvas] {
|
|
|
3410
3397
|
font-size: 12px;
|
|
3411
3398
|
}
|
|
3412
3399
|
|
|
3400
|
+
/**
|
|
3401
|
+
* ItemGroup-like border styles for the background panel's ToolsPanelItems.
|
|
3402
|
+
* Replicates the separated border of the `ItemGroup` component while
|
|
3403
|
+
* allowing for hidden placeholder items (same approach as the color panel).
|
|
3404
|
+
*/
|
|
3405
|
+
.block-editor-background-panel__item {
|
|
3406
|
+
padding: 0;
|
|
3407
|
+
max-width: 100%;
|
|
3408
|
+
position: relative;
|
|
3409
|
+
border-right: 1px solid #ddd;
|
|
3410
|
+
border-left: 1px solid #ddd;
|
|
3411
|
+
border-bottom: 1px solid #ddd;
|
|
3412
|
+
}
|
|
3413
|
+
.block-editor-background-panel__item:nth-child(1 of .block-editor-background-panel__item) {
|
|
3414
|
+
border-top-right-radius: 2px;
|
|
3415
|
+
border-top-left-radius: 2px;
|
|
3416
|
+
border-top: 1px solid #ddd;
|
|
3417
|
+
}
|
|
3418
|
+
.block-editor-background-panel__item:nth-last-child(1 of .block-editor-background-panel__item) {
|
|
3419
|
+
border-bottom-right-radius: 2px;
|
|
3420
|
+
border-bottom-left-radius: 2px;
|
|
3421
|
+
}
|
|
3422
|
+
.block-editor-background-panel__item > div,
|
|
3423
|
+
.block-editor-background-panel__item > div > button {
|
|
3424
|
+
border-radius: inherit;
|
|
3425
|
+
}
|
|
3426
|
+
|
|
3427
|
+
.background-block-support-panel {
|
|
3428
|
+
/* Increased specificity required to remove the slot wrapper's row gap */
|
|
3429
|
+
}
|
|
3430
|
+
.background-block-support-panel.background-block-support-panel .background-block-support-panel__inner-wrapper {
|
|
3431
|
+
row-gap: 0;
|
|
3432
|
+
}
|
|
3433
|
+
|
|
3413
3434
|
.block-editor-content-only-controls__link {
|
|
3414
3435
|
width: 100%;
|
|
3415
3436
|
box-shadow: inset 0 0 0 1px #ccc;
|
package/build-style/style.css
CHANGED
|
@@ -116,17 +116,7 @@
|
|
|
116
116
|
color: inherit !important;
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
-
.block-editor-autocompleters__link {
|
|
120
|
-
white-space: nowrap;
|
|
121
|
-
}
|
|
122
|
-
.block-editor-autocompleters__link .block-editor-block-icon {
|
|
123
|
-
margin-right: 8px;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
119
|
.block-editor-global-styles-background-panel__inspector-media-replace-container {
|
|
127
|
-
border: 1px solid #ddd;
|
|
128
|
-
border-radius: 2px;
|
|
129
|
-
grid-column: 1/-1;
|
|
130
120
|
position: relative;
|
|
131
121
|
}
|
|
132
122
|
.block-editor-global-styles-background-panel__inspector-media-replace-container.is-open {
|
|
@@ -1622,10 +1612,7 @@ iframe[name=editor-canvas] {
|
|
|
1622
1612
|
}
|
|
1623
1613
|
|
|
1624
1614
|
.block-editor-fit-text-size-warning {
|
|
1625
|
-
|
|
1626
|
-
}
|
|
1627
|
-
.block-editor-fit-text-size-warning .components-notice__content {
|
|
1628
|
-
margin-right: 0;
|
|
1615
|
+
grid-column: span 2;
|
|
1629
1616
|
}
|
|
1630
1617
|
|
|
1631
1618
|
.components-font-appearance-control [role=option] {
|
|
@@ -3412,6 +3399,40 @@ iframe[name=editor-canvas] {
|
|
|
3412
3399
|
font-size: 12px;
|
|
3413
3400
|
}
|
|
3414
3401
|
|
|
3402
|
+
/**
|
|
3403
|
+
* ItemGroup-like border styles for the background panel's ToolsPanelItems.
|
|
3404
|
+
* Replicates the separated border of the `ItemGroup` component while
|
|
3405
|
+
* allowing for hidden placeholder items (same approach as the color panel).
|
|
3406
|
+
*/
|
|
3407
|
+
.block-editor-background-panel__item {
|
|
3408
|
+
padding: 0;
|
|
3409
|
+
max-width: 100%;
|
|
3410
|
+
position: relative;
|
|
3411
|
+
border-left: 1px solid #ddd;
|
|
3412
|
+
border-right: 1px solid #ddd;
|
|
3413
|
+
border-bottom: 1px solid #ddd;
|
|
3414
|
+
}
|
|
3415
|
+
.block-editor-background-panel__item:nth-child(1 of .block-editor-background-panel__item) {
|
|
3416
|
+
border-top-left-radius: 2px;
|
|
3417
|
+
border-top-right-radius: 2px;
|
|
3418
|
+
border-top: 1px solid #ddd;
|
|
3419
|
+
}
|
|
3420
|
+
.block-editor-background-panel__item:nth-last-child(1 of .block-editor-background-panel__item) {
|
|
3421
|
+
border-bottom-left-radius: 2px;
|
|
3422
|
+
border-bottom-right-radius: 2px;
|
|
3423
|
+
}
|
|
3424
|
+
.block-editor-background-panel__item > div,
|
|
3425
|
+
.block-editor-background-panel__item > div > button {
|
|
3426
|
+
border-radius: inherit;
|
|
3427
|
+
}
|
|
3428
|
+
|
|
3429
|
+
.background-block-support-panel {
|
|
3430
|
+
/* Increased specificity required to remove the slot wrapper's row gap */
|
|
3431
|
+
}
|
|
3432
|
+
.background-block-support-panel.background-block-support-panel .background-block-support-panel__inner-wrapper {
|
|
3433
|
+
row-gap: 0;
|
|
3434
|
+
}
|
|
3435
|
+
|
|
3415
3436
|
.block-editor-content-only-controls__link {
|
|
3416
3437
|
width: 100%;
|
|
3417
3438
|
box-shadow: inset 0 0 0 1px #ccc;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/block-editor",
|
|
3
|
-
"version": "15.
|
|
3
|
+
"version": "15.16.1-next.v.202604091042.0+668146787",
|
|
4
4
|
"description": "Generic block editor.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -61,43 +61,42 @@
|
|
|
61
61
|
],
|
|
62
62
|
"dependencies": {
|
|
63
63
|
"@react-spring/web": "^9.4.5",
|
|
64
|
-
"@wordpress/a11y": "^4.
|
|
65
|
-
"@wordpress/
|
|
66
|
-
"@wordpress/
|
|
67
|
-
"@wordpress/
|
|
68
|
-
"@wordpress/
|
|
69
|
-
"@wordpress/
|
|
70
|
-
"@wordpress/
|
|
71
|
-
"@wordpress/
|
|
72
|
-
"@wordpress/
|
|
73
|
-
"@wordpress/
|
|
74
|
-
"@wordpress/
|
|
75
|
-
"@wordpress/
|
|
76
|
-
"@wordpress/
|
|
77
|
-
"@wordpress/
|
|
78
|
-
"@wordpress/
|
|
79
|
-
"@wordpress/
|
|
80
|
-
"@wordpress/
|
|
81
|
-
"@wordpress/
|
|
82
|
-
"@wordpress/
|
|
83
|
-
"@wordpress/
|
|
84
|
-
"@wordpress/
|
|
85
|
-
"@wordpress/
|
|
86
|
-
"@wordpress/
|
|
87
|
-
"@wordpress/
|
|
88
|
-
"@wordpress/
|
|
89
|
-
"@wordpress/
|
|
90
|
-
"@wordpress/
|
|
91
|
-
"@wordpress/
|
|
92
|
-
"@wordpress/
|
|
93
|
-
"@wordpress/
|
|
94
|
-
"@wordpress/
|
|
95
|
-
"@wordpress/
|
|
96
|
-
"@wordpress/
|
|
97
|
-
"@wordpress/
|
|
98
|
-
"@wordpress/
|
|
99
|
-
"@wordpress/
|
|
100
|
-
"@wordpress/wordcount": "^4.42.0",
|
|
64
|
+
"@wordpress/a11y": "^4.43.1-next.v.202604091042.0+668146787",
|
|
65
|
+
"@wordpress/base-styles": "^6.19.1-next.v.202604091042.0+668146787",
|
|
66
|
+
"@wordpress/blob": "^4.43.1-next.v.202604091042.0+668146787",
|
|
67
|
+
"@wordpress/block-serialization-default-parser": "^5.43.1-next.v.202604091042.0+668146787",
|
|
68
|
+
"@wordpress/blocks": "^15.16.1-next.v.202604091042.0+668146787",
|
|
69
|
+
"@wordpress/commands": "^1.43.1-next.v.202604091042.0+668146787",
|
|
70
|
+
"@wordpress/components": "^32.5.2-next.v.202604091042.0+668146787",
|
|
71
|
+
"@wordpress/compose": "^7.43.1-next.v.202604091042.0+668146787",
|
|
72
|
+
"@wordpress/data": "^10.43.1-next.v.202604091042.0+668146787",
|
|
73
|
+
"@wordpress/dataviews": "^14.1.1-next.v.202604091042.0+668146787",
|
|
74
|
+
"@wordpress/date": "^5.43.1-next.v.202604091042.0+668146787",
|
|
75
|
+
"@wordpress/deprecated": "^4.43.1-next.v.202604091042.0+668146787",
|
|
76
|
+
"@wordpress/dom": "^4.43.1-next.v.202604091042.0+668146787",
|
|
77
|
+
"@wordpress/element": "^6.44.1-next.v.202604091042.0+668146787",
|
|
78
|
+
"@wordpress/escape-html": "^3.43.1-next.v.202604091042.0+668146787",
|
|
79
|
+
"@wordpress/global-styles-engine": "^1.10.1-next.v.202604091042.0+668146787",
|
|
80
|
+
"@wordpress/hooks": "^4.43.1-next.v.202604091042.0+668146787",
|
|
81
|
+
"@wordpress/html-entities": "^4.43.1-next.v.202604091042.0+668146787",
|
|
82
|
+
"@wordpress/i18n": "^6.17.1-next.v.202604091042.0+668146787",
|
|
83
|
+
"@wordpress/icons": "^12.1.1-next.v.202604091042.0+668146787",
|
|
84
|
+
"@wordpress/image-cropper": "^1.7.1-next.v.202604091042.0+668146787",
|
|
85
|
+
"@wordpress/interactivity": "^6.43.1-next.v.202604091042.0+668146787",
|
|
86
|
+
"@wordpress/is-shallow-equal": "^5.43.1-next.v.202604091042.0+668146787",
|
|
87
|
+
"@wordpress/keyboard-shortcuts": "^5.43.1-next.v.202604091042.0+668146787",
|
|
88
|
+
"@wordpress/keycodes": "^4.43.1-next.v.202604091042.0+668146787",
|
|
89
|
+
"@wordpress/notices": "^5.43.1-next.v.202604091042.0+668146787",
|
|
90
|
+
"@wordpress/preferences": "^4.43.1-next.v.202604091042.0+668146787",
|
|
91
|
+
"@wordpress/priority-queue": "^3.43.1-next.v.202604091042.0+668146787",
|
|
92
|
+
"@wordpress/private-apis": "^1.43.1-next.v.202604091042.0+668146787",
|
|
93
|
+
"@wordpress/rich-text": "^7.43.1-next.v.202604091042.0+668146787",
|
|
94
|
+
"@wordpress/style-engine": "^2.43.1-next.v.202604091042.0+668146787",
|
|
95
|
+
"@wordpress/token-list": "^3.43.1-next.v.202604091042.0+668146787",
|
|
96
|
+
"@wordpress/upload-media": "^0.28.1-next.v.202604091042.0+668146787",
|
|
97
|
+
"@wordpress/url": "^4.43.1-next.v.202604091042.0+668146787",
|
|
98
|
+
"@wordpress/warning": "^3.43.1-next.v.202604091042.0+668146787",
|
|
99
|
+
"@wordpress/wordcount": "^4.43.1-next.v.202604091042.0+668146787",
|
|
101
100
|
"change-case": "^4.1.2",
|
|
102
101
|
"clsx": "^2.1.1",
|
|
103
102
|
"colord": "^2.7.0",
|
|
@@ -124,5 +123,5 @@
|
|
|
124
123
|
"publishConfig": {
|
|
125
124
|
"access": "public"
|
|
126
125
|
},
|
|
127
|
-
"gitHead": "
|
|
126
|
+
"gitHead": "73606df74f1c38a084bfa5db97205259ef817593"
|
|
128
127
|
}
|
|
@@ -14,7 +14,6 @@ import { getDefaultBlockName, getBlockSupport } from '@wordpress/blocks';
|
|
|
14
14
|
*/
|
|
15
15
|
import { useBlockEditContext } from '../block-edit/context';
|
|
16
16
|
import blockAutocompleter from '../../autocompleters/block';
|
|
17
|
-
import linkAutocompleter from '../../autocompleters/link';
|
|
18
17
|
|
|
19
18
|
/**
|
|
20
19
|
* Shared reference to an empty array for cases where it is important to avoid
|
|
@@ -27,7 +26,7 @@ const EMPTY_ARRAY = [];
|
|
|
27
26
|
function useCompleters( { completers = EMPTY_ARRAY } ) {
|
|
28
27
|
const { name } = useBlockEditContext();
|
|
29
28
|
return useMemo( () => {
|
|
30
|
-
let filteredCompleters = [ ...completers
|
|
29
|
+
let filteredCompleters = [ ...completers ];
|
|
31
30
|
|
|
32
31
|
if (
|
|
33
32
|
name === getDefaultBlockName() ||
|
|
@@ -3,10 +3,6 @@
|
|
|
3
3
|
@use "@wordpress/base-styles/z-index" as *;
|
|
4
4
|
|
|
5
5
|
.block-editor-global-styles-background-panel__inspector-media-replace-container {
|
|
6
|
-
border: $border-width solid $gray-300;
|
|
7
|
-
border-radius: $radius-small;
|
|
8
|
-
// Full width. ToolsPanel lays out children in a grid.
|
|
9
|
-
grid-column: 1 / -1;
|
|
10
6
|
position: relative;
|
|
11
7
|
|
|
12
8
|
&.is-open {
|
|
@@ -6,7 +6,7 @@ import TextareaAutosize from 'react-autosize-textarea';
|
|
|
6
6
|
/**
|
|
7
7
|
* WordPress dependencies
|
|
8
8
|
*/
|
|
9
|
-
import { useEffect, useState } from '@wordpress/element';
|
|
9
|
+
import { useEffect, useMemo, useState } from '@wordpress/element';
|
|
10
10
|
import { useSelect, useDispatch } from '@wordpress/data';
|
|
11
11
|
import {
|
|
12
12
|
getBlockAttributes,
|
|
@@ -28,6 +28,16 @@ function BlockHTML( { clientId } ) {
|
|
|
28
28
|
[ clientId ]
|
|
29
29
|
);
|
|
30
30
|
const { updateBlock } = useDispatch( blockEditorStore );
|
|
31
|
+
|
|
32
|
+
// Derive block content as a primitive string so the effect only fires
|
|
33
|
+
// when the serialized content genuinely changes, not when the block
|
|
34
|
+
// object reference changes (which happens on every RESET_BLOCKS during
|
|
35
|
+
// RTC sync, even for unchanged blocks).
|
|
36
|
+
const blockContent = useMemo(
|
|
37
|
+
() => ( block ? getBlockContent( block ) : '' ),
|
|
38
|
+
[ block ]
|
|
39
|
+
);
|
|
40
|
+
|
|
31
41
|
const onChange = () => {
|
|
32
42
|
const blockType = getBlockType( block.name );
|
|
33
43
|
|
|
@@ -64,8 +74,8 @@ function BlockHTML( { clientId } ) {
|
|
|
64
74
|
};
|
|
65
75
|
|
|
66
76
|
useEffect( () => {
|
|
67
|
-
setHtml(
|
|
68
|
-
}, [
|
|
77
|
+
setHtml( blockContent );
|
|
78
|
+
}, [ blockContent ] );
|
|
69
79
|
|
|
70
80
|
return (
|
|
71
81
|
<TextareaAutosize
|
|
@@ -12,6 +12,7 @@ import { useInstanceId } from '@wordpress/compose';
|
|
|
12
12
|
import { useSelect, useDispatch } from '@wordpress/data';
|
|
13
13
|
import { forwardRef } from '@wordpress/element';
|
|
14
14
|
import { __, isRTL } from '@wordpress/i18n';
|
|
15
|
+
import { displayShortcut } from '@wordpress/keycodes';
|
|
15
16
|
|
|
16
17
|
/**
|
|
17
18
|
* Internal dependencies
|
|
@@ -65,7 +66,6 @@ const BlockMoverButton = forwardRef(
|
|
|
65
66
|
? clientIds
|
|
66
67
|
: [ clientIds ];
|
|
67
68
|
const blocksCount = normalizedClientIds.length;
|
|
68
|
-
const { disabled } = props;
|
|
69
69
|
|
|
70
70
|
const {
|
|
71
71
|
blockType,
|
|
@@ -99,9 +99,7 @@ const BlockMoverButton = forwardRef(
|
|
|
99
99
|
|
|
100
100
|
return {
|
|
101
101
|
blockType: block ? getBlockType( block.name ) : null,
|
|
102
|
-
isDisabled:
|
|
103
|
-
disabled ||
|
|
104
|
-
( direction === 'up' ? isFirstBlock : isLastBlock ),
|
|
102
|
+
isDisabled: direction === 'up' ? isFirstBlock : isLastBlock,
|
|
105
103
|
rootClientId: blockRootClientId,
|
|
106
104
|
firstIndex: firstBlockIndex,
|
|
107
105
|
isFirst: isFirstBlock,
|
|
@@ -145,6 +143,11 @@ const BlockMoverButton = forwardRef(
|
|
|
145
143
|
onClick={ isDisabled ? null : onClick }
|
|
146
144
|
disabled={ isDisabled }
|
|
147
145
|
accessibleWhenDisabled
|
|
146
|
+
shortcut={
|
|
147
|
+
direction === 'up'
|
|
148
|
+
? displayShortcut.secondary( 't' )
|
|
149
|
+
: displayShortcut.secondary( 'y' )
|
|
150
|
+
}
|
|
148
151
|
/>
|
|
149
152
|
<VisuallyHidden id={ descriptionId }>
|
|
150
153
|
{ getBlockMoverDescription(
|
|
@@ -19,12 +19,7 @@ import BlockDraggable from '../block-draggable';
|
|
|
19
19
|
import { BlockMoverUpButton, BlockMoverDownButton } from './button';
|
|
20
20
|
import { store as blockEditorStore } from '../../store';
|
|
21
21
|
|
|
22
|
-
function BlockMover( {
|
|
23
|
-
clientIds,
|
|
24
|
-
hideDragHandle,
|
|
25
|
-
isBlockMoverUpButtonDisabled,
|
|
26
|
-
isBlockMoverDownButtonDisabled,
|
|
27
|
-
} ) {
|
|
22
|
+
function BlockMover( { clientIds, hideDragHandle } ) {
|
|
28
23
|
const {
|
|
29
24
|
canMove,
|
|
30
25
|
rootClientId,
|
|
@@ -104,7 +99,6 @@ function BlockMover( {
|
|
|
104
99
|
<ToolbarItem>
|
|
105
100
|
{ ( itemProps ) => (
|
|
106
101
|
<BlockMoverUpButton
|
|
107
|
-
disabled={ isBlockMoverUpButtonDisabled }
|
|
108
102
|
clientIds={ clientIds }
|
|
109
103
|
{ ...itemProps }
|
|
110
104
|
/>
|
|
@@ -113,7 +107,6 @@ function BlockMover( {
|
|
|
113
107
|
<ToolbarItem>
|
|
114
108
|
{ ( itemProps ) => (
|
|
115
109
|
<BlockMoverDownButton
|
|
116
|
-
disabled={ isBlockMoverDownButtonDisabled }
|
|
117
110
|
clientIds={ clientIds }
|
|
118
111
|
{ ...itemProps }
|
|
119
112
|
/>
|
|
@@ -17,6 +17,7 @@ import { unseen } from '@wordpress/icons';
|
|
|
17
17
|
import { unlock } from '../../lock-unlock';
|
|
18
18
|
import { store as blockEditorStore } from '../../store';
|
|
19
19
|
import useBlockVisibility from './use-block-visibility';
|
|
20
|
+
import { useBlockElement } from '../block-list/use-block-props/use-block-refs';
|
|
20
21
|
import { deviceTypeKey } from '../../store/private-keys';
|
|
21
22
|
import { BLOCK_VISIBILITY_VIEWPORTS } from './constants';
|
|
22
23
|
|
|
@@ -56,10 +57,16 @@ export default function ViewportVisibilityInfo( { clientId } ) {
|
|
|
56
57
|
[ clientId ]
|
|
57
58
|
);
|
|
58
59
|
|
|
59
|
-
//
|
|
60
|
+
// Get the block's DOM element to derive the canvas iframe window,
|
|
61
|
+
// so viewport detection matches the actual block rendering context.
|
|
62
|
+
const blockElement = useBlockElement( clientId );
|
|
63
|
+
const rawCanvasView = blockElement?.ownerDocument?.defaultView;
|
|
64
|
+
const canvasView = rawCanvasView === null ? undefined : rawCanvasView;
|
|
65
|
+
|
|
60
66
|
const { isBlockCurrentlyHidden, currentViewport } = useBlockVisibility( {
|
|
61
67
|
blockVisibility: currentBlockVisibility,
|
|
62
68
|
deviceType: selectedDeviceType,
|
|
69
|
+
view: canvasView,
|
|
63
70
|
} );
|
|
64
71
|
|
|
65
72
|
/*
|