@wordpress/block-library 6.0.8 → 6.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cover/edit.js +9 -3
- package/build/cover/edit.js.map +1 -1
- package/build/gallery/deprecated.js +314 -26
- package/build/gallery/deprecated.js.map +1 -1
- package/build/gallery/edit-wrapper.js +10 -27
- package/build/gallery/edit-wrapper.js.map +1 -1
- package/build/gallery/edit.js +11 -13
- package/build/gallery/edit.js.map +1 -1
- package/build/gallery/save.js +3 -3
- package/build/gallery/save.js.map +1 -1
- package/build/gallery/shared.js +24 -0
- package/build/gallery/shared.js.map +1 -1
- package/build/gallery/transforms.js +8 -22
- package/build/gallery/transforms.js.map +1 -1
- package/build/gallery/use-mobile-warning.js +1 -1
- package/build/gallery/use-mobile-warning.js.map +1 -1
- package/build/gallery/v1/edit.js +2 -21
- package/build/gallery/v1/edit.js.map +1 -1
- package/build/index.js +4 -3
- package/build/index.js.map +1 -1
- package/build/navigation/deprecated.js +127 -19
- package/build/navigation/deprecated.js.map +1 -1
- package/build/navigation/edit/index.js +46 -31
- package/build/navigation/edit/index.js.map +1 -1
- package/build/navigation/edit/inner-blocks.js +0 -4
- package/build/navigation/edit/inner-blocks.js.map +1 -1
- package/build/navigation/edit/navigation-menu-selector.js +2 -2
- package/build/navigation/edit/navigation-menu-selector.js.map +1 -1
- package/build/navigation/edit/placeholder/index.js +16 -48
- package/build/navigation/edit/placeholder/index.js.map +1 -1
- package/build/navigation/edit/unsaved-inner-blocks.js +4 -35
- package/build/navigation/edit/unsaved-inner-blocks.js.map +1 -1
- package/build/navigation/edit/use-create-navigation-menu.js +50 -0
- package/build/navigation/edit/use-create-navigation-menu.js.map +1 -0
- package/build/navigation/edit/use-generate-default-navigation-title.js +73 -0
- package/build/navigation/edit/use-generate-default-navigation-title.js.map +1 -0
- package/build/navigation/index.js +1 -1
- package/build/navigation/save.js +2 -2
- package/build/navigation/save.js.map +1 -1
- package/build/navigation/use-navigation-menu.js +19 -8
- package/build/navigation/use-navigation-menu.js.map +1 -1
- package/build/navigation-area/edit.js +5 -0
- package/build/navigation-area/edit.js.map +1 -1
- package/build/navigation-submenu/edit.js +4 -0
- package/build/navigation-submenu/edit.js.map +1 -1
- package/build/pattern/index.js +1 -1
- package/build/post-featured-image/edit.js +2 -3
- package/build/post-featured-image/edit.js.map +1 -1
- package/build/post-terms/index.js +1 -1
- package/build/post-title/edit.js +2 -2
- package/build/post-title/edit.js.map +1 -1
- package/build/query-pagination/index.js +1 -1
- package/build/query-pagination-next/index.js +2 -2
- package/build/query-pagination-numbers/index.js +1 -1
- package/build/query-pagination-previous/index.js +2 -2
- package/build/query-title/index.js +1 -1
- package/build/separator/separator-settings.js +1 -0
- package/build/separator/separator-settings.js.map +1 -1
- package/build/site-logo/index.js +1 -1
- package/build/site-tagline/index.js +1 -1
- package/build/site-title/index.js +1 -1
- package/build/social-links/edit.js +1 -0
- package/build/social-links/edit.js.map +1 -1
- package/build/template-part/edit/placeholder/index.js +1 -1
- package/build/template-part/edit/placeholder/index.js.map +1 -1
- package/build/template-part/index.js +2 -1
- package/build/template-part/index.js.map +1 -1
- package/build-module/cover/edit.js +9 -3
- package/build-module/cover/edit.js.map +1 -1
- package/build-module/gallery/deprecated.js +309 -27
- package/build-module/gallery/deprecated.js.map +1 -1
- package/build-module/gallery/edit-wrapper.js +7 -27
- package/build-module/gallery/edit-wrapper.js.map +1 -1
- package/build-module/gallery/edit.js +11 -13
- package/build-module/gallery/edit.js.map +1 -1
- package/build-module/gallery/save.js +2 -3
- package/build-module/gallery/save.js.map +1 -1
- package/build-module/gallery/shared.js +22 -0
- package/build-module/gallery/shared.js.map +1 -1
- package/build-module/gallery/transforms.js +9 -21
- package/build-module/gallery/transforms.js.map +1 -1
- package/build-module/gallery/use-mobile-warning.js +1 -1
- package/build-module/gallery/use-mobile-warning.js.map +1 -1
- package/build-module/gallery/v1/edit.js +4 -22
- package/build-module/gallery/v1/edit.js.map +1 -1
- package/build-module/index.js +4 -3
- package/build-module/index.js.map +1 -1
- package/build-module/navigation/deprecated.js +127 -19
- package/build-module/navigation/deprecated.js.map +1 -1
- package/build-module/navigation/edit/index.js +47 -31
- package/build-module/navigation/edit/index.js.map +1 -1
- package/build-module/navigation/edit/inner-blocks.js +0 -4
- package/build-module/navigation/edit/inner-blocks.js.map +1 -1
- package/build-module/navigation/edit/navigation-menu-selector.js +2 -2
- package/build-module/navigation/edit/navigation-menu-selector.js.map +1 -1
- package/build-module/navigation/edit/placeholder/index.js +15 -45
- package/build-module/navigation/edit/placeholder/index.js.map +1 -1
- package/build-module/navigation/edit/unsaved-inner-blocks.js +6 -35
- package/build-module/navigation/edit/unsaved-inner-blocks.js.map +1 -1
- package/build-module/navigation/edit/use-create-navigation-menu.js +36 -0
- package/build-module/navigation/edit/use-create-navigation-menu.js.map +1 -0
- package/build-module/navigation/edit/use-generate-default-navigation-title.js +57 -0
- package/build-module/navigation/edit/use-generate-default-navigation-title.js.map +1 -0
- package/build-module/navigation/index.js +1 -1
- package/build-module/navigation/save.js +2 -2
- package/build-module/navigation/save.js.map +1 -1
- package/build-module/navigation/use-navigation-menu.js +19 -8
- package/build-module/navigation/use-navigation-menu.js.map +1 -1
- package/build-module/navigation-area/edit.js +4 -0
- package/build-module/navigation-area/edit.js.map +1 -1
- package/build-module/navigation-submenu/edit.js +4 -0
- package/build-module/navigation-submenu/edit.js.map +1 -1
- package/build-module/pattern/index.js +1 -1
- package/build-module/post-featured-image/edit.js +2 -3
- package/build-module/post-featured-image/edit.js.map +1 -1
- package/build-module/post-terms/index.js +1 -1
- package/build-module/post-title/edit.js +2 -2
- package/build-module/post-title/edit.js.map +1 -1
- package/build-module/query-pagination/index.js +1 -1
- package/build-module/query-pagination-next/index.js +2 -2
- package/build-module/query-pagination-numbers/index.js +1 -1
- package/build-module/query-pagination-previous/index.js +2 -2
- package/build-module/query-title/index.js +1 -1
- package/build-module/separator/separator-settings.js +1 -0
- package/build-module/separator/separator-settings.js.map +1 -1
- package/build-module/site-logo/index.js +1 -1
- package/build-module/site-tagline/index.js +1 -1
- package/build-module/site-title/index.js +1 -1
- package/build-module/social-links/edit.js +1 -0
- package/build-module/social-links/edit.js.map +1 -1
- package/build-module/template-part/edit/placeholder/index.js +2 -2
- package/build-module/template-part/edit/placeholder/index.js.map +1 -1
- package/build-module/template-part/index.js +2 -1
- package/build-module/template-part/index.js.map +1 -1
- package/build-style/columns/editor-rtl.css +1 -1
- package/build-style/columns/editor.css +1 -1
- package/build-style/editor-rtl.css +6 -5
- package/build-style/editor.css +6 -5
- package/build-style/gallery/editor-rtl.css +1 -0
- package/build-style/gallery/editor.css +1 -0
- package/build-style/navigation/style-rtl.css +12 -3
- package/build-style/navigation/style.css +12 -3
- package/build-style/post-featured-image/editor-rtl.css +2 -2
- package/build-style/post-featured-image/editor.css +2 -2
- package/build-style/site-logo/editor-rtl.css +2 -2
- package/build-style/site-logo/editor.css +2 -2
- package/build-style/style-rtl.css +12 -3
- package/build-style/style.css +12 -3
- package/package.json +9 -9
- package/src/calendar/index.php +2 -2
- package/src/columns/editor.scss +3 -2
- package/src/cover/edit.js +9 -1
- package/src/gallery/deprecated.js +831 -559
- package/src/gallery/edit-wrapper.js +7 -27
- package/src/gallery/edit.js +11 -13
- package/src/gallery/editor.scss +1 -0
- package/src/gallery/save.js +2 -1
- package/src/gallery/shared.js +24 -0
- package/src/gallery/transforms.js +9 -27
- package/src/gallery/use-mobile-warning.js +1 -1
- package/src/gallery/v1/edit.js +1 -28
- package/src/index.js +28 -26
- package/src/navigation/block.json +1 -1
- package/src/navigation/deprecated.js +115 -13
- package/src/navigation/edit/index.js +44 -36
- package/src/navigation/edit/inner-blocks.js +0 -5
- package/src/navigation/edit/navigation-menu-selector.js +2 -2
- package/src/navigation/edit/placeholder/index.js +16 -62
- package/src/navigation/edit/unsaved-inner-blocks.js +6 -57
- package/src/navigation/edit/use-create-navigation-menu.js +39 -0
- package/src/navigation/edit/use-generate-default-navigation-title.js +79 -0
- package/src/navigation/index.php +263 -26
- package/src/navigation/save.js +2 -2
- package/src/navigation/style.scss +15 -4
- package/src/navigation/use-navigation-menu.js +20 -9
- package/src/navigation-area/edit.js +5 -0
- package/src/navigation-area/index.php +1 -0
- package/src/navigation-submenu/edit.js +6 -0
- package/src/navigation-submenu/index.php +30 -45
- package/src/page-list/index.php +14 -13
- package/src/pattern/block.json +1 -1
- package/src/post-featured-image/edit.js +2 -5
- package/src/post-featured-image/editor.scss +2 -2
- package/src/post-terms/block.json +1 -1
- package/src/post-title/edit.js +2 -2
- package/src/query-pagination/block.json +1 -1
- package/src/query-pagination-next/block.json +2 -2
- package/src/query-pagination-numbers/block.json +1 -1
- package/src/query-pagination-previous/block.json +2 -2
- package/src/query-title/block.json +1 -1
- package/src/separator/separator-settings.js +1 -0
- package/src/site-logo/block.json +1 -1
- package/src/site-logo/editor.scss +2 -2
- package/src/site-tagline/block.json +1 -1
- package/src/site-title/block.json +1 -1
- package/src/social-links/edit.js +1 -0
- package/src/template-part/block.json +2 -1
- package/src/template-part/edit/placeholder/index.js +2 -2
- package/src/template-part/index.php +38 -1
- package/build/gallery/v1/update-gallery-modal.js +0 -114
- package/build/gallery/v1/update-gallery-modal.js.map +0 -1
- package/build/navigation/edit/navigation-menu-name-modal.js +0 -55
- package/build/navigation/edit/navigation-menu-name-modal.js.map +0 -1
- package/build/navigation/edit/navigation-menu-publish-button.js +0 -53
- package/build/navigation/edit/navigation-menu-publish-button.js.map +0 -1
- package/build-module/gallery/v1/update-gallery-modal.js +0 -97
- package/build-module/gallery/v1/update-gallery-modal.js.map +0 -1
- package/build-module/navigation/edit/navigation-menu-name-modal.js +0 -47
- package/build-module/navigation/edit/navigation-menu-name-modal.js.map +0 -1
- package/build-module/navigation/edit/navigation-menu-publish-button.js +0 -40
- package/build-module/navigation/edit/navigation-menu-publish-button.js.map +0 -1
- package/src/gallery/v1/update-gallery-modal.js +0 -97
- package/src/navigation/edit/navigation-menu-name-modal.js +0 -69
- package/src/navigation/edit/navigation-menu-publish-button.js +0 -57
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/block-library/src/template-part/edit/placeholder/index.js"],"names":["find","__","sprintf","useCallback","useState","useDispatch","useSelect","Placeholder","Dropdown","Button","Spinner","serialize","store","coreStore","TemplatePartSelection","PatternsSetup","PLACEHOLDER_STEPS","initial","patterns","TemplatePartPlaceholder","area","clientId","setAttributes","enableSelection","hasResolvedReplacements","saveEntityRecord","step","setStep","areaIcon","areaLabel","select","definedAreas","__experimentalGetDefaultTemplatePartAreas","selectedArea","defaultArea","icon","label","onCreate","startingBlocks","title","record","slug","content","templatePart","theme","undefined","toLowerCase","isOpen","onToggle","onClose"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,IAAT,
|
|
1
|
+
{"version":3,"sources":["@wordpress/block-library/src/template-part/edit/placeholder/index.js"],"names":["find","kebabCase","__","sprintf","useCallback","useState","useDispatch","useSelect","Placeholder","Dropdown","Button","Spinner","serialize","store","coreStore","TemplatePartSelection","PatternsSetup","PLACEHOLDER_STEPS","initial","patterns","TemplatePartPlaceholder","area","clientId","setAttributes","enableSelection","hasResolvedReplacements","saveEntityRecord","step","setStep","areaIcon","areaLabel","select","definedAreas","__experimentalGetDefaultTemplatePartAreas","selectedArea","defaultArea","icon","label","onCreate","startingBlocks","title","record","slug","content","templatePart","theme","undefined","toLowerCase","isOpen","onToggle","onClose"],"mappings":"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","sourcesContent":["/**\n * External dependencies\n */\nimport { find, kebabCase } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useCallback, useState } from '@wordpress/element';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { Placeholder, Dropdown, Button, Spinner } from '@wordpress/components';\nimport { serialize } from '@wordpress/blocks';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport TemplatePartSelection from '../selection';\nimport PatternsSetup from './patterns-setup';\n\nconst PLACEHOLDER_STEPS = {\n\tinitial: 1,\n\tpatterns: 2,\n};\n\nexport default function TemplatePartPlaceholder( {\n\tarea,\n\tclientId,\n\tsetAttributes,\n\tenableSelection,\n\thasResolvedReplacements,\n} ) {\n\tconst { saveEntityRecord } = useDispatch( coreStore );\n\tconst [ step, setStep ] = useState( PLACEHOLDER_STEPS.initial );\n\n\tconst { areaIcon, areaLabel } = useSelect(\n\t\t( select ) => {\n\t\t\t// FIXME: @wordpress/block-library should not depend on @wordpress/editor.\n\t\t\t// Blocks can be loaded into a *non-post* block editor.\n\t\t\t// eslint-disable-next-line @wordpress/data-no-store-string-literals\n\t\t\tconst definedAreas = select(\n\t\t\t\t'core/editor'\n\t\t\t).__experimentalGetDefaultTemplatePartAreas();\n\n\t\t\tconst selectedArea = find( definedAreas, { area } );\n\t\t\tconst defaultArea = find( definedAreas, { area: 'uncategorized' } );\n\n\t\t\treturn {\n\t\t\t\tareaIcon: selectedArea?.icon || defaultArea?.icon,\n\t\t\t\tareaLabel: selectedArea?.label || __( 'Template Part' ),\n\t\t\t};\n\t\t},\n\t\t[ area ]\n\t);\n\n\tconst onCreate = useCallback(\n\t\tasync (\n\t\t\tstartingBlocks = [],\n\t\t\ttitle = __( 'Untitled Template Part' )\n\t\t) => {\n\t\t\t// If we have `area` set from block attributes, means an exposed\n\t\t\t// block variation was inserted. So add this prop to the template\n\t\t\t// part entity on creation. Afterwards remove `area` value from\n\t\t\t// block attributes.\n\t\t\tconst record = {\n\t\t\t\ttitle,\n\t\t\t\tslug: kebabCase( title ),\n\t\t\t\tcontent: serialize( startingBlocks ),\n\t\t\t\t// `area` is filterable on the server and defaults to `UNCATEGORIZED`\n\t\t\t\t// if provided value is not allowed.\n\t\t\t\tarea,\n\t\t\t};\n\t\t\tconst templatePart = await saveEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\t'wp_template_part',\n\t\t\t\trecord\n\t\t\t);\n\t\t\tsetAttributes( {\n\t\t\t\tslug: templatePart.slug,\n\t\t\t\ttheme: templatePart.theme,\n\t\t\t\tarea: undefined,\n\t\t\t} );\n\t\t},\n\t\t[ setAttributes, area ]\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t{ step === PLACEHOLDER_STEPS.initial && (\n\t\t\t\t<Placeholder\n\t\t\t\t\ticon={ areaIcon }\n\t\t\t\t\tlabel={ areaLabel }\n\t\t\t\t\tinstructions={\n\t\t\t\t\t\tenableSelection\n\t\t\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t\t\t// Translators: %s as template part area title (\"Header\", \"Footer\", etc.).\n\t\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t\t'Choose an existing %s or create a new one.'\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\tareaLabel.toLowerCase()\n\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t: sprintf(\n\t\t\t\t\t\t\t\t\t// Translators: %s as template part area title (\"Header\", \"Footer\", etc.).\n\t\t\t\t\t\t\t\t\t__( 'Create a new %s.' ),\n\t\t\t\t\t\t\t\t\tareaLabel.toLowerCase()\n\t\t\t\t\t\t\t )\n\t\t\t\t\t}\n\t\t\t\t>\n\t\t\t\t\t{ ! hasResolvedReplacements ? (\n\t\t\t\t\t\t<Spinner />\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<Dropdown\n\t\t\t\t\t\t\tcontentClassName=\"wp-block-template-part__placeholder-preview-dropdown-content\"\n\t\t\t\t\t\t\tposition=\"bottom right left\"\n\t\t\t\t\t\t\trenderToggle={ ( { isOpen, onToggle } ) => (\n\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t{ enableSelection && (\n\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\t\t\t\t\tonClick={ onToggle }\n\t\t\t\t\t\t\t\t\t\t\taria-expanded={ isOpen }\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{ __( 'Choose existing' ) }\n\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\tvariant={\n\t\t\t\t\t\t\t\t\t\t\tenableSelection\n\t\t\t\t\t\t\t\t\t\t\t\t? 'tertiary'\n\t\t\t\t\t\t\t\t\t\t\t\t: 'primary'\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\t\t\t\t\t\tsetStep(\n\t\t\t\t\t\t\t\t\t\t\t\tPLACEHOLDER_STEPS.patterns\n\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{ sprintf(\n\t\t\t\t\t\t\t\t\t\t\t// Translators: %s as template part area title (\"Header\", \"Footer\", etc.).\n\t\t\t\t\t\t\t\t\t\t\t__( 'New %s' ),\n\t\t\t\t\t\t\t\t\t\t\tareaLabel.toLowerCase()\n\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\trenderContent={ ( { onClose } ) => (\n\t\t\t\t\t\t\t\t<TemplatePartSelection\n\t\t\t\t\t\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t\t\t\t\t\t\tonClose={ onClose }\n\t\t\t\t\t\t\t\t\tarea={ area }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</Placeholder>\n\t\t\t) }\n\t\t\t{ step === PLACEHOLDER_STEPS.patterns && (\n\t\t\t\t<PatternsSetup\n\t\t\t\t\tarea={ area }\n\t\t\t\t\tareaLabel={ areaLabel }\n\t\t\t\t\tareaIcon={ areaIcon }\n\t\t\t\t\tonCreate={ onCreate }\n\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\tresetPlaceholder={ () =>\n\t\t\t\t\t\tsetStep( PLACEHOLDER_STEPS.initial )\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t) }\n\t\t</>\n\t);\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/block-library/src/template-part/index.js"],"names":["startCase","store","coreDataStore","select","symbolFilled","addFilter","edit","enhanceTemplatePartVariations","name","metadata","settings","icon","__experimentalLabel","slug","theme","entity","getEntityRecord","title","rendered"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAT,QAA0B,QAA1B;AAEA;AACA;AACA;;AACA,SAASC,KAAK,IAAIC,aAAlB,QAAuC,sBAAvC;AACA,SAASC,MAAT,QAAuB,iBAAvB;AACA,SAASC,YAAT,QAA6B,kBAA7B;AACA,SAASC,SAAT,QAA0B,kBAA1B;AAEA;AACA;AACA
|
|
1
|
+
{"version":3,"sources":["@wordpress/block-library/src/template-part/index.js"],"names":["startCase","store","coreDataStore","select","symbolFilled","addFilter","edit","enhanceTemplatePartVariations","name","metadata","settings","icon","__experimentalLabel","slug","theme","entity","getEntityRecord","title","rendered"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAT,QAA0B,QAA1B;AAEA;AACA;AACA;;AACA,SAASC,KAAK,IAAIC,aAAlB,QAAuC,sBAAvC;AACA,SAASC,MAAT,QAAuB,iBAAvB;AACA,SAASC,YAAT,QAA6B,kBAA7B;AACA,SAASC,SAAT,QAA0B,kBAA1B;AAEA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,OAAOC,IAAP,MAAiB,QAAjB;AACA,SAASC,6BAAT,QAA8C,cAA9C;AAEA,MAAM;AAAEC,EAAAA;AAAF,IAAWC,QAAjB;AACA,SAASA,QAAT,EAAmBD,IAAnB;AAEA,OAAO,MAAME,QAAQ,GAAG;AACvBC,EAAAA,IAAI,EAAEP,YADiB;AAEvBQ,EAAAA,mBAAmB,EAAE,QAAuB;AAAA;;AAAA,QAArB;AAAEC,MAAAA,IAAF;AAAQC,MAAAA;AAAR,KAAqB;;AAC3C;AACA;AACA,QAAK,CAAED,IAAP,EAAc;AACb;AACA;;AAED,UAAME,MAAM,GAAGZ,MAAM,CAAED,aAAF,CAAN,CAAwBc,eAAxB,CACd,UADc,EAEd,kBAFc,EAGdF,KAAK,GAAG,IAAR,GAAeD,IAHD,CAAf;;AAKA,QAAK,CAAEE,MAAP,EAAgB;AACf;AACA;;AAED,WAAOf,SAAS,CAAE,kBAAAe,MAAM,CAACE,KAAP,gEAAcC,QAAd,KAA0BH,MAAM,CAACF,IAAnC,CAAhB;AACA,GAnBsB;AAoBvBP,EAAAA;AApBuB,CAAjB,C,CAuBP;;AACAD,SAAS,CACR,0BADQ,EAER,oBAFQ,EAGRE,6BAHQ,CAAT","sourcesContent":["/**\n * External dependencies\n */\nimport { startCase } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { store as coreDataStore } from '@wordpress/core-data';\nimport { select } from '@wordpress/data';\nimport { symbolFilled } from '@wordpress/icons';\nimport { addFilter } from '@wordpress/hooks';\n\n/**\n * Internal dependencies\n */\nimport metadata from './block.json';\nimport edit from './edit';\nimport { enhanceTemplatePartVariations } from './variations';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon: symbolFilled,\n\t__experimentalLabel: ( { slug, theme } ) => {\n\t\t// Attempt to find entity title if block is a template part.\n\t\t// Require slug to request, otherwise entity is uncreated and will throw 404.\n\t\tif ( ! slug ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst entity = select( coreDataStore ).getEntityRecord(\n\t\t\t'postType',\n\t\t\t'wp_template_part',\n\t\t\ttheme + '//' + slug\n\t\t);\n\t\tif ( ! entity ) {\n\t\t\treturn;\n\t\t}\n\n\t\treturn startCase( entity.title?.rendered || entity.slug );\n\t},\n\tedit,\n};\n\n// Importing this file includes side effects. This is whitelisted in block-library/package.json under sideEffects\naddFilter(\n\t'blocks.registerBlockType',\n\t'core/template-part',\n\tenhanceTemplatePartVariations\n);\n"]}
|
|
@@ -229,7 +229,7 @@ div[data-type="core/button"] {
|
|
|
229
229
|
margin-right: var(--wp--style--block-gap, 2em);
|
|
230
230
|
}
|
|
231
231
|
}
|
|
232
|
-
.
|
|
232
|
+
html :where(.wp-block-column) {
|
|
233
233
|
margin-top: 0;
|
|
234
234
|
margin-bottom: 0;
|
|
235
235
|
}
|
|
@@ -820,6 +820,7 @@ figure.wp-block-gallery .components-spinner {
|
|
|
820
820
|
bottom: 0;
|
|
821
821
|
right: 0;
|
|
822
822
|
z-index: 1;
|
|
823
|
+
pointer-events: none;
|
|
823
824
|
}
|
|
824
825
|
.blocks-gallery-item figure.is-transient img {
|
|
825
826
|
opacity: 0.3;
|
|
@@ -1975,7 +1976,7 @@ body.editor-styles-wrapper .wp-block-navigation__responsive-container.is-menu-op
|
|
|
1975
1976
|
bottom: 0;
|
|
1976
1977
|
right: 0;
|
|
1977
1978
|
border: 1px dashed currentColor;
|
|
1978
|
-
opacity: 0.
|
|
1979
|
+
opacity: 0.4;
|
|
1979
1980
|
pointer-events: none;
|
|
1980
1981
|
border-radius: inherit;
|
|
1981
1982
|
}
|
|
@@ -2015,7 +2016,7 @@ body.editor-styles-wrapper .wp-block-navigation__responsive-container.is-menu-op
|
|
|
2015
2016
|
height: 100%;
|
|
2016
2017
|
stroke: currentColor;
|
|
2017
2018
|
stroke-dasharray: 3;
|
|
2018
|
-
opacity: 0.
|
|
2019
|
+
opacity: 0.4;
|
|
2019
2020
|
}
|
|
2020
2021
|
.wp-block-site-logo.wp-block-site-logo.is-selected .components-button.components-button {
|
|
2021
2022
|
background: var(--wp-admin-theme-color);
|
|
@@ -2502,7 +2503,7 @@ body.editor-styles-wrapper .wp-block-navigation__responsive-container.is-menu-op
|
|
|
2502
2503
|
bottom: 0;
|
|
2503
2504
|
right: 0;
|
|
2504
2505
|
border: 1px dashed currentColor;
|
|
2505
|
-
opacity: 0.
|
|
2506
|
+
opacity: 0.4;
|
|
2506
2507
|
pointer-events: none;
|
|
2507
2508
|
border-radius: inherit;
|
|
2508
2509
|
}
|
|
@@ -2547,7 +2548,7 @@ body.editor-styles-wrapper .wp-block-navigation__responsive-container.is-menu-op
|
|
|
2547
2548
|
height: 100%;
|
|
2548
2549
|
stroke: currentColor;
|
|
2549
2550
|
stroke-dasharray: 3;
|
|
2550
|
-
opacity: 0.
|
|
2551
|
+
opacity: 0.4;
|
|
2551
2552
|
}
|
|
2552
2553
|
.wp-block-post-featured-image.wp-block-post-featured-image[style*=height] .components-placeholder {
|
|
2553
2554
|
min-height: 48px;
|
package/build-style/editor.css
CHANGED
|
@@ -230,7 +230,7 @@ div[data-type="core/button"] {
|
|
|
230
230
|
margin-left: var(--wp--style--block-gap, 2em);
|
|
231
231
|
}
|
|
232
232
|
}
|
|
233
|
-
.
|
|
233
|
+
html :where(.wp-block-column) {
|
|
234
234
|
margin-top: 0;
|
|
235
235
|
margin-bottom: 0;
|
|
236
236
|
}
|
|
@@ -825,6 +825,7 @@ figure.wp-block-gallery .components-spinner {
|
|
|
825
825
|
bottom: 0;
|
|
826
826
|
left: 0;
|
|
827
827
|
z-index: 1;
|
|
828
|
+
pointer-events: none;
|
|
828
829
|
}
|
|
829
830
|
.blocks-gallery-item figure.is-transient img {
|
|
830
831
|
opacity: 0.3;
|
|
@@ -1980,7 +1981,7 @@ body.editor-styles-wrapper .wp-block-navigation__responsive-container.is-menu-op
|
|
|
1980
1981
|
bottom: 0;
|
|
1981
1982
|
left: 0;
|
|
1982
1983
|
border: 1px dashed currentColor;
|
|
1983
|
-
opacity: 0.
|
|
1984
|
+
opacity: 0.4;
|
|
1984
1985
|
pointer-events: none;
|
|
1985
1986
|
border-radius: inherit;
|
|
1986
1987
|
}
|
|
@@ -2020,7 +2021,7 @@ body.editor-styles-wrapper .wp-block-navigation__responsive-container.is-menu-op
|
|
|
2020
2021
|
height: 100%;
|
|
2021
2022
|
stroke: currentColor;
|
|
2022
2023
|
stroke-dasharray: 3;
|
|
2023
|
-
opacity: 0.
|
|
2024
|
+
opacity: 0.4;
|
|
2024
2025
|
}
|
|
2025
2026
|
.wp-block-site-logo.wp-block-site-logo.is-selected .components-button.components-button {
|
|
2026
2027
|
background: var(--wp-admin-theme-color);
|
|
@@ -2510,7 +2511,7 @@ body.editor-styles-wrapper .wp-block-navigation__responsive-container.is-menu-op
|
|
|
2510
2511
|
bottom: 0;
|
|
2511
2512
|
left: 0;
|
|
2512
2513
|
border: 1px dashed currentColor;
|
|
2513
|
-
opacity: 0.
|
|
2514
|
+
opacity: 0.4;
|
|
2514
2515
|
pointer-events: none;
|
|
2515
2516
|
border-radius: inherit;
|
|
2516
2517
|
}
|
|
@@ -2555,7 +2556,7 @@ body.editor-styles-wrapper .wp-block-navigation__responsive-container.is-menu-op
|
|
|
2555
2556
|
height: 100%;
|
|
2556
2557
|
stroke: currentColor;
|
|
2557
2558
|
stroke-dasharray: 3;
|
|
2558
|
-
opacity: 0.
|
|
2559
|
+
opacity: 0.4;
|
|
2559
2560
|
}
|
|
2560
2561
|
.wp-block-post-featured-image.wp-block-post-featured-image[style*=height] .components-placeholder {
|
|
2561
2562
|
min-height: 48px;
|
|
@@ -119,17 +119,23 @@
|
|
|
119
119
|
}
|
|
120
120
|
.wp-block-navigation .wp-block-navigation__submenu-icon {
|
|
121
121
|
align-self: center;
|
|
122
|
-
height: inherit;
|
|
123
122
|
line-height: 0;
|
|
124
|
-
|
|
123
|
+
display: inline-block;
|
|
124
|
+
vertical-align: middle;
|
|
125
|
+
font-size: inherit;
|
|
125
126
|
padding: 0;
|
|
126
127
|
background-color: inherit;
|
|
127
128
|
color: currentColor;
|
|
128
129
|
border: none;
|
|
130
|
+
margin-right: 0.25em;
|
|
131
|
+
width: 0.6em;
|
|
132
|
+
height: 0.6em;
|
|
129
133
|
}
|
|
130
134
|
.wp-block-navigation .wp-block-navigation__submenu-icon svg {
|
|
131
135
|
display: inline-block;
|
|
132
136
|
stroke: currentColor;
|
|
137
|
+
width: inherit;
|
|
138
|
+
height: inherit;
|
|
133
139
|
}
|
|
134
140
|
|
|
135
141
|
.wp-block-navigation .has-child :where(.wp-block-navigation__submenu-container) {
|
|
@@ -349,10 +355,13 @@ button.wp-block-navigation-item__content {
|
|
|
349
355
|
display: flex;
|
|
350
356
|
flex-direction: column;
|
|
351
357
|
align-items: var(--layout-justification-setting, inherit);
|
|
352
|
-
justify-content: flex-start;
|
|
353
358
|
overflow: auto;
|
|
354
359
|
padding: 0;
|
|
355
360
|
}
|
|
361
|
+
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content,
|
|
362
|
+
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation__container {
|
|
363
|
+
justify-content: flex-start;
|
|
364
|
+
}
|
|
356
365
|
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation__submenu-icon {
|
|
357
366
|
display: none;
|
|
358
367
|
}
|
|
@@ -119,17 +119,23 @@
|
|
|
119
119
|
}
|
|
120
120
|
.wp-block-navigation .wp-block-navigation__submenu-icon {
|
|
121
121
|
align-self: center;
|
|
122
|
-
height: inherit;
|
|
123
122
|
line-height: 0;
|
|
124
|
-
|
|
123
|
+
display: inline-block;
|
|
124
|
+
vertical-align: middle;
|
|
125
|
+
font-size: inherit;
|
|
125
126
|
padding: 0;
|
|
126
127
|
background-color: inherit;
|
|
127
128
|
color: currentColor;
|
|
128
129
|
border: none;
|
|
130
|
+
margin-left: 0.25em;
|
|
131
|
+
width: 0.6em;
|
|
132
|
+
height: 0.6em;
|
|
129
133
|
}
|
|
130
134
|
.wp-block-navigation .wp-block-navigation__submenu-icon svg {
|
|
131
135
|
display: inline-block;
|
|
132
136
|
stroke: currentColor;
|
|
137
|
+
width: inherit;
|
|
138
|
+
height: inherit;
|
|
133
139
|
}
|
|
134
140
|
|
|
135
141
|
.wp-block-navigation .has-child :where(.wp-block-navigation__submenu-container) {
|
|
@@ -349,10 +355,13 @@ button.wp-block-navigation-item__content {
|
|
|
349
355
|
display: flex;
|
|
350
356
|
flex-direction: column;
|
|
351
357
|
align-items: var(--layout-justification-setting, inherit);
|
|
352
|
-
justify-content: flex-start;
|
|
353
358
|
overflow: auto;
|
|
354
359
|
padding: 0;
|
|
355
360
|
}
|
|
361
|
+
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content,
|
|
362
|
+
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation__container {
|
|
363
|
+
justify-content: flex-start;
|
|
364
|
+
}
|
|
356
365
|
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation__submenu-icon {
|
|
357
366
|
display: none;
|
|
358
367
|
}
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
bottom: 0;
|
|
115
115
|
right: 0;
|
|
116
116
|
border: 1px dashed currentColor;
|
|
117
|
-
opacity: 0.
|
|
117
|
+
opacity: 0.4;
|
|
118
118
|
pointer-events: none;
|
|
119
119
|
border-radius: inherit;
|
|
120
120
|
}
|
|
@@ -159,7 +159,7 @@
|
|
|
159
159
|
height: 100%;
|
|
160
160
|
stroke: currentColor;
|
|
161
161
|
stroke-dasharray: 3;
|
|
162
|
-
opacity: 0.
|
|
162
|
+
opacity: 0.4;
|
|
163
163
|
}
|
|
164
164
|
.wp-block-post-featured-image.wp-block-post-featured-image[style*=height] .components-placeholder {
|
|
165
165
|
min-height: 48px;
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
bottom: 0;
|
|
115
115
|
left: 0;
|
|
116
116
|
border: 1px dashed currentColor;
|
|
117
|
-
opacity: 0.
|
|
117
|
+
opacity: 0.4;
|
|
118
118
|
pointer-events: none;
|
|
119
119
|
border-radius: inherit;
|
|
120
120
|
}
|
|
@@ -159,7 +159,7 @@
|
|
|
159
159
|
height: 100%;
|
|
160
160
|
stroke: currentColor;
|
|
161
161
|
stroke-dasharray: 3;
|
|
162
|
-
opacity: 0.
|
|
162
|
+
opacity: 0.4;
|
|
163
163
|
}
|
|
164
164
|
.wp-block-post-featured-image.wp-block-post-featured-image[style*=height] .components-placeholder {
|
|
165
165
|
min-height: 48px;
|
|
@@ -154,7 +154,7 @@
|
|
|
154
154
|
bottom: 0;
|
|
155
155
|
right: 0;
|
|
156
156
|
border: 1px dashed currentColor;
|
|
157
|
-
opacity: 0.
|
|
157
|
+
opacity: 0.4;
|
|
158
158
|
pointer-events: none;
|
|
159
159
|
border-radius: inherit;
|
|
160
160
|
}
|
|
@@ -194,7 +194,7 @@
|
|
|
194
194
|
height: 100%;
|
|
195
195
|
stroke: currentColor;
|
|
196
196
|
stroke-dasharray: 3;
|
|
197
|
-
opacity: 0.
|
|
197
|
+
opacity: 0.4;
|
|
198
198
|
}
|
|
199
199
|
.wp-block-site-logo.wp-block-site-logo.is-selected .components-button.components-button {
|
|
200
200
|
background: var(--wp-admin-theme-color);
|
|
@@ -154,7 +154,7 @@
|
|
|
154
154
|
bottom: 0;
|
|
155
155
|
left: 0;
|
|
156
156
|
border: 1px dashed currentColor;
|
|
157
|
-
opacity: 0.
|
|
157
|
+
opacity: 0.4;
|
|
158
158
|
pointer-events: none;
|
|
159
159
|
border-radius: inherit;
|
|
160
160
|
}
|
|
@@ -194,7 +194,7 @@
|
|
|
194
194
|
height: 100%;
|
|
195
195
|
stroke: currentColor;
|
|
196
196
|
stroke-dasharray: 3;
|
|
197
|
-
opacity: 0.
|
|
197
|
+
opacity: 0.4;
|
|
198
198
|
}
|
|
199
199
|
.wp-block-site-logo.wp-block-site-logo.is-selected .components-button.components-button {
|
|
200
200
|
background: var(--wp-admin-theme-color);
|
|
@@ -1531,17 +1531,23 @@ ul.has-background {
|
|
|
1531
1531
|
}
|
|
1532
1532
|
.wp-block-navigation .wp-block-navigation__submenu-icon {
|
|
1533
1533
|
align-self: center;
|
|
1534
|
-
height: inherit;
|
|
1535
1534
|
line-height: 0;
|
|
1536
|
-
|
|
1535
|
+
display: inline-block;
|
|
1536
|
+
vertical-align: middle;
|
|
1537
|
+
font-size: inherit;
|
|
1537
1538
|
padding: 0;
|
|
1538
1539
|
background-color: inherit;
|
|
1539
1540
|
color: currentColor;
|
|
1540
1541
|
border: none;
|
|
1542
|
+
margin-right: 0.25em;
|
|
1543
|
+
width: 0.6em;
|
|
1544
|
+
height: 0.6em;
|
|
1541
1545
|
}
|
|
1542
1546
|
.wp-block-navigation .wp-block-navigation__submenu-icon svg {
|
|
1543
1547
|
display: inline-block;
|
|
1544
1548
|
stroke: currentColor;
|
|
1549
|
+
width: inherit;
|
|
1550
|
+
height: inherit;
|
|
1545
1551
|
}
|
|
1546
1552
|
|
|
1547
1553
|
.wp-block-navigation .has-child :where(.wp-block-navigation__submenu-container) {
|
|
@@ -1761,10 +1767,13 @@ button.wp-block-navigation-item__content {
|
|
|
1761
1767
|
display: flex;
|
|
1762
1768
|
flex-direction: column;
|
|
1763
1769
|
align-items: var(--layout-justification-setting, inherit);
|
|
1764
|
-
justify-content: flex-start;
|
|
1765
1770
|
overflow: auto;
|
|
1766
1771
|
padding: 0;
|
|
1767
1772
|
}
|
|
1773
|
+
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content,
|
|
1774
|
+
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation__container {
|
|
1775
|
+
justify-content: flex-start;
|
|
1776
|
+
}
|
|
1768
1777
|
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation__submenu-icon {
|
|
1769
1778
|
display: none;
|
|
1770
1779
|
}
|
package/build-style/style.css
CHANGED
|
@@ -1553,17 +1553,23 @@ ul.has-background {
|
|
|
1553
1553
|
}
|
|
1554
1554
|
.wp-block-navigation .wp-block-navigation__submenu-icon {
|
|
1555
1555
|
align-self: center;
|
|
1556
|
-
height: inherit;
|
|
1557
1556
|
line-height: 0;
|
|
1558
|
-
|
|
1557
|
+
display: inline-block;
|
|
1558
|
+
vertical-align: middle;
|
|
1559
|
+
font-size: inherit;
|
|
1559
1560
|
padding: 0;
|
|
1560
1561
|
background-color: inherit;
|
|
1561
1562
|
color: currentColor;
|
|
1562
1563
|
border: none;
|
|
1564
|
+
margin-left: 0.25em;
|
|
1565
|
+
width: 0.6em;
|
|
1566
|
+
height: 0.6em;
|
|
1563
1567
|
}
|
|
1564
1568
|
.wp-block-navigation .wp-block-navigation__submenu-icon svg {
|
|
1565
1569
|
display: inline-block;
|
|
1566
1570
|
stroke: currentColor;
|
|
1571
|
+
width: inherit;
|
|
1572
|
+
height: inherit;
|
|
1567
1573
|
}
|
|
1568
1574
|
|
|
1569
1575
|
.wp-block-navigation .has-child :where(.wp-block-navigation__submenu-container) {
|
|
@@ -1783,10 +1789,13 @@ button.wp-block-navigation-item__content {
|
|
|
1783
1789
|
display: flex;
|
|
1784
1790
|
flex-direction: column;
|
|
1785
1791
|
align-items: var(--layout-justification-setting, inherit);
|
|
1786
|
-
justify-content: flex-start;
|
|
1787
1792
|
overflow: auto;
|
|
1788
1793
|
padding: 0;
|
|
1789
1794
|
}
|
|
1795
|
+
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content,
|
|
1796
|
+
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation__container {
|
|
1797
|
+
justify-content: flex-start;
|
|
1798
|
+
}
|
|
1790
1799
|
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation__submenu-icon {
|
|
1791
1800
|
display: none;
|
|
1792
1801
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/block-library",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.12",
|
|
4
4
|
"description": "Block library for the WordPress editor.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -37,11 +37,11 @@
|
|
|
37
37
|
"@wordpress/api-fetch": "^5.2.6",
|
|
38
38
|
"@wordpress/autop": "^3.2.3",
|
|
39
39
|
"@wordpress/blob": "^3.2.2",
|
|
40
|
-
"@wordpress/block-editor": "^8.0.
|
|
40
|
+
"@wordpress/block-editor": "^8.0.8",
|
|
41
41
|
"@wordpress/blocks": "^11.1.4",
|
|
42
|
-
"@wordpress/components": "^19.
|
|
42
|
+
"@wordpress/components": "^19.1.2",
|
|
43
43
|
"@wordpress/compose": "^5.0.6",
|
|
44
|
-
"@wordpress/core-data": "^4.0.
|
|
44
|
+
"@wordpress/core-data": "^4.0.8",
|
|
45
45
|
"@wordpress/data": "^6.1.4",
|
|
46
46
|
"@wordpress/date": "^4.2.3",
|
|
47
47
|
"@wordpress/deprecated": "^3.2.3",
|
|
@@ -52,14 +52,14 @@
|
|
|
52
52
|
"@wordpress/html-entities": "^3.2.3",
|
|
53
53
|
"@wordpress/i18n": "^4.2.4",
|
|
54
54
|
"@wordpress/icons": "^6.1.1",
|
|
55
|
-
"@wordpress/interface": "^4.1.
|
|
55
|
+
"@wordpress/interface": "^4.1.10",
|
|
56
56
|
"@wordpress/is-shallow-equal": "^4.2.1",
|
|
57
57
|
"@wordpress/keycodes": "^3.2.4",
|
|
58
58
|
"@wordpress/notices": "^3.2.7",
|
|
59
59
|
"@wordpress/primitives": "^3.0.4",
|
|
60
|
-
"@wordpress/reusable-blocks": "^3.0.
|
|
60
|
+
"@wordpress/reusable-blocks": "^3.0.14",
|
|
61
61
|
"@wordpress/rich-text": "^5.0.6",
|
|
62
|
-
"@wordpress/server-side-render": "^3.0.
|
|
62
|
+
"@wordpress/server-side-render": "^3.0.12",
|
|
63
63
|
"@wordpress/url": "^3.3.1",
|
|
64
64
|
"@wordpress/viewport": "^4.0.6",
|
|
65
65
|
"classnames": "^2.3.1",
|
|
@@ -67,11 +67,11 @@
|
|
|
67
67
|
"fast-average-color": "4.3.0",
|
|
68
68
|
"lodash": "^4.17.21",
|
|
69
69
|
"memize": "^1.1.0",
|
|
70
|
-
"micromodal": "^0.4.
|
|
70
|
+
"micromodal": "^0.4.9",
|
|
71
71
|
"moment": "^2.22.1"
|
|
72
72
|
},
|
|
73
73
|
"publishConfig": {
|
|
74
74
|
"access": "public"
|
|
75
75
|
},
|
|
76
|
-
"gitHead": "
|
|
76
|
+
"gitHead": "34b76b2f9397215e5afb8443f5b3073c83913102"
|
|
77
77
|
}
|
package/src/calendar/index.php
CHANGED
|
@@ -85,7 +85,7 @@ function block_core_calendar_has_published_posts() {
|
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
// On single sites we try our own cached option first.
|
|
88
|
-
$has_published_posts = get_option( '
|
|
88
|
+
$has_published_posts = get_option( 'wp_calendar_block_has_published_posts', null );
|
|
89
89
|
if ( null !== $has_published_posts ) {
|
|
90
90
|
return (bool) $has_published_posts;
|
|
91
91
|
}
|
|
@@ -103,7 +103,7 @@ function block_core_calendar_has_published_posts() {
|
|
|
103
103
|
function block_core_calendar_update_has_published_posts() {
|
|
104
104
|
global $wpdb;
|
|
105
105
|
$has_published_posts = (bool) $wpdb->get_var( "SELECT 1 as test FROM {$wpdb->posts} WHERE post_type = 'post' AND post_status = 'publish' LIMIT 1" );
|
|
106
|
-
update_option( '
|
|
106
|
+
update_option( 'wp_calendar_block_has_published_posts', $has_published_posts );
|
|
107
107
|
return $has_published_posts;
|
|
108
108
|
}
|
|
109
109
|
|
package/src/columns/editor.scss
CHANGED
|
@@ -25,8 +25,9 @@
|
|
|
25
25
|
|
|
26
26
|
// Individual columns do not have top and bottom margins on the frontend.
|
|
27
27
|
// So we make the editor match that.
|
|
28
|
-
//
|
|
29
|
-
.
|
|
28
|
+
// We use :where to provide minimum specificity, so that intentional margins,
|
|
29
|
+
// such as those configured in theme.json, override and win on specificity.
|
|
30
|
+
html :where(.wp-block-column) {
|
|
30
31
|
margin-top: 0;
|
|
31
32
|
margin-bottom: 0;
|
|
32
33
|
}
|
package/src/cover/edit.js
CHANGED
|
@@ -310,6 +310,7 @@ function CoverEdit( {
|
|
|
310
310
|
setAttributes,
|
|
311
311
|
setOverlayColor,
|
|
312
312
|
toggleSelection,
|
|
313
|
+
markNextChangeAsNotPersistent,
|
|
313
314
|
} ) {
|
|
314
315
|
const {
|
|
315
316
|
contentPosition,
|
|
@@ -391,6 +392,8 @@ function CoverEdit( {
|
|
|
391
392
|
);
|
|
392
393
|
|
|
393
394
|
useEffect( () => {
|
|
395
|
+
// This side-effect should not create an undo level.
|
|
396
|
+
markNextChangeAsNotPersistent();
|
|
394
397
|
setAttributes( { isDark: isCoverDark } );
|
|
395
398
|
}, [ isCoverDark ] );
|
|
396
399
|
|
|
@@ -544,6 +547,7 @@ function CoverEdit( {
|
|
|
544
547
|
) }
|
|
545
548
|
<PanelColorGradientSettings
|
|
546
549
|
__experimentalHasMultipleOrigins
|
|
550
|
+
__experimentalIsRenderedInSidebar
|
|
547
551
|
title={ __( 'Overlay' ) }
|
|
548
552
|
initialOpen={ true }
|
|
549
553
|
settings={ [
|
|
@@ -769,10 +773,14 @@ function CoverEdit( {
|
|
|
769
773
|
|
|
770
774
|
export default compose( [
|
|
771
775
|
withDispatch( ( dispatch ) => {
|
|
772
|
-
const {
|
|
776
|
+
const {
|
|
777
|
+
toggleSelection,
|
|
778
|
+
__unstableMarkNextChangeAsNotPersistent,
|
|
779
|
+
} = dispatch( blockEditorStore );
|
|
773
780
|
|
|
774
781
|
return {
|
|
775
782
|
toggleSelection,
|
|
783
|
+
markNextChangeAsNotPersistent: __unstableMarkNextChangeAsNotPersistent,
|
|
776
784
|
};
|
|
777
785
|
} ),
|
|
778
786
|
withColors( { overlayColor: 'background-color' } ),
|