Full Site Editing - Version 0.11

Version Description

  • Add color, background color, font size, and text alignment support to the Site Title, Site Description, and Navigation Menu blocks.
Download this release

Release Info

Developer Copons
Plugin Icon wp plugin Full Site Editing
Version 0.11
Comparing to
See all releases

Code changes from version 0.10 to 0.11

full-site-editing-plugin.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Plugin Name: Full Site Editing
4
  * Description: Enhances your page creation workflow within the Block Editor.
5
- * Version: 0.10
6
  * Author: Automattic
7
  * Author URI: https://automattic.com/wordpress-plugins/
8
  * License: GPLv2 or later
@@ -20,7 +20,7 @@ namespace A8C\FSE;
20
  *
21
  * @var string
22
  */
23
- define( 'PLUGIN_VERSION', '0.10' );
24
 
25
  // Themes which are supported by Full Site Editing (not the same as the SPT themes).
26
  const SUPPORTED_THEMES = [ 'maywood' ];
2
  /**
3
  * Plugin Name: Full Site Editing
4
  * Description: Enhances your page creation workflow within the Block Editor.
5
+ * Version: 0.11
6
  * Author: Automattic
7
  * Author URI: https://automattic.com/wordpress-plugins/
8
  * License: GPLv2 or later
20
  *
21
  * @var string
22
  */
23
+ define( 'PLUGIN_VERSION', '0.11' );
24
 
25
  // Themes which are supported by Full Site Editing (not the same as the SPT themes).
26
  const SUPPORTED_THEMES = [ 'maywood' ];
full-site-editing/blocks/navigation-menu/edit.js CHANGED
@@ -1,24 +1,85 @@
 
1
  /* eslint-disable import/no-extraneous-dependencies */
2
- /**
3
- * External dependencies
4
- */
5
-
6
  /**
7
  * WordPress dependencies
8
  */
9
  import ServerSideRender from '@wordpress/server-side-render';
10
  import { Fragment } from '@wordpress/element';
 
 
 
 
 
 
 
 
 
 
 
 
 
11
 
12
  /**
13
  * Internal dependencies
14
  */
15
 
16
- const NavigationMenuEdit = () => {
 
 
 
 
 
 
 
 
 
 
 
17
  return (
18
  <Fragment>
19
- <ServerSideRender block="a8c/navigation-menu" />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20
  </Fragment>
21
  );
22
  };
23
 
24
- export default NavigationMenuEdit;
 
 
 
1
+ /* eslint-disable wpcalypso/jsx-classname-namespace */
2
  /* eslint-disable import/no-extraneous-dependencies */
 
 
 
 
3
  /**
4
  * WordPress dependencies
5
  */
6
  import ServerSideRender from '@wordpress/server-side-render';
7
  import { Fragment } from '@wordpress/element';
8
+ import { compose } from '@wordpress/compose';
9
+ import { __ } from '@wordpress/i18n';
10
+ import {
11
+ AlignmentToolbar,
12
+ BlockControls,
13
+ ContrastChecker,
14
+ FontSizePicker,
15
+ InspectorControls,
16
+ PanelColorSettings,
17
+ withColors,
18
+ withFontSizes,
19
+ } from '@wordpress/block-editor';
20
+ import { PanelBody } from '@wordpress/components';
21
 
22
  /**
23
  * Internal dependencies
24
  */
25
 
26
+ const NavigationMenuEdit = ( {
27
+ attributes,
28
+ backgroundColor,
29
+ fontSize,
30
+ setAttributes,
31
+ setBackgroundColor,
32
+ setFontSize,
33
+ setTextColor,
34
+ textColor,
35
+ } ) => {
36
+ const { textAlign } = attributes;
37
+
38
  return (
39
  <Fragment>
40
+ <BlockControls>
41
+ <AlignmentToolbar
42
+ value={ textAlign }
43
+ onChange={ nextAlign => {
44
+ setAttributes( { textAlign: nextAlign } );
45
+ } }
46
+ />
47
+ </BlockControls>
48
+ <InspectorControls>
49
+ <PanelBody className="blocks-font-size" title={ __( 'Text Settings' ) }>
50
+ <FontSizePicker onChange={ setFontSize } value={ fontSize.size } />
51
+ </PanelBody>
52
+ <PanelColorSettings
53
+ title={ __( 'Color Settings' ) }
54
+ initialOpen={ false }
55
+ colorSettings={ [
56
+ {
57
+ value: backgroundColor.color,
58
+ onChange: setBackgroundColor,
59
+ label: __( 'Background Color' ),
60
+ },
61
+ {
62
+ value: textColor.color,
63
+ onChange: setTextColor,
64
+ label: __( 'Text Color' ),
65
+ },
66
+ ] }
67
+ >
68
+ <ContrastChecker
69
+ { ...{
70
+ textColor: textColor.color,
71
+ backgroundColor: backgroundColor.color,
72
+ } }
73
+ fontSize={ fontSize.size }
74
+ />
75
+ </PanelColorSettings>
76
+ </InspectorControls>
77
+ <ServerSideRender block="a8c/navigation-menu" attributes={ attributes } />
78
  </Fragment>
79
  );
80
  };
81
 
82
+ export default compose( [
83
+ withColors( 'backgroundColor', { textColor: 'color' } ),
84
+ withFontSizes( 'fontSize' ),
85
+ ] )( NavigationMenuEdit );
full-site-editing/blocks/navigation-menu/index.js CHANGED
@@ -28,12 +28,6 @@ registerBlockType( 'a8c/navigation-menu', {
28
  html: false,
29
  reusable: false,
30
  },
31
- attributes: {
32
- align: {
33
- type: 'string',
34
- default: 'wide',
35
- },
36
- },
37
  edit,
38
  save: () => null,
39
  } );
28
  html: false,
29
  reusable: false,
30
  },
 
 
 
 
 
 
31
  edit,
32
  save: () => null,
33
  } );
full-site-editing/blocks/navigation-menu/index.php CHANGED
@@ -14,6 +14,49 @@ namespace A8C\FSE;
14
  * @return string
15
  */
16
  function render_navigation_menu_block( $attributes ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
  $menu = wp_nav_menu(
18
  [
19
  'echo' => false,
@@ -21,14 +64,10 @@ function render_navigation_menu_block( $attributes ) {
21
  'items_wrap' => '<ul id="%1$s" class="%2$s" aria-label="submenu">%3$s</ul>',
22
  'menu_class' => 'main-menu footer-menu',
23
  'theme_location' => 'menu-1',
 
24
  ]
25
  );
26
 
27
- $align = ' alignwide';
28
- if ( isset( $attributes['align'] ) ) {
29
- $align = empty( $attributes['align'] ) ? '' : ' align' . $attributes['align'];
30
- }
31
-
32
  ob_start();
33
  // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped
34
  ?>
@@ -41,7 +80,9 @@ function render_navigation_menu_block( $attributes ) {
41
  <span class="hide-visually expanded-text"><?php esc_html_e( 'expanded', 'full-site-editing' ); ?></span>
42
  <span class="hide-visually collapsed-text"><?php esc_html_e( 'collapsed', 'full-site-editing' ); ?></span>
43
  </label>
44
- <?php echo $menu ? $menu : get_fallback_navigation_menu(); ?>
 
 
45
  </nav>
46
  <!-- #site-navigation -->
47
  <?php
@@ -63,7 +104,7 @@ function get_fallback_navigation_menu() {
63
  'container' => 'ul',
64
  'echo' => false,
65
  'menu_class' => 'main-menu footer-menu',
66
- 'sort_column' => 'post_date',
67
  ]
68
  );
69
 
@@ -75,7 +116,5 @@ function get_fallback_navigation_menu() {
75
  $original_classes = [ 'children', 'page_item_has_sub-menu' ];
76
  $replacement_classes = [ 'sub-menu', 'menu-item-has-children' ];
77
 
78
- return '<div class="menu-primary-container">'
79
- . str_replace( $original_classes, $replacement_classes, $menu )
80
- . '</div>';
81
  }
14
  * @return string
15
  */
16
  function render_navigation_menu_block( $attributes ) {
17
+ $styles = '';
18
+
19
+ $class = 'menu-primary-container';
20
+ if ( isset( $attributes['className'] ) ) {
21
+ $class .= ' ' . $attributes['className'];
22
+ }
23
+
24
+ $align = ' alignwide';
25
+ if ( isset( $attributes['align'] ) ) {
26
+ $align = empty( $attributes['align'] ) ? '' : ' align' . $attributes['align'];
27
+ }
28
+ $class .= $align;
29
+
30
+ if ( isset( $attributes['textAlign'] ) ) {
31
+ $class .= ' has-text-align-' . $attributes['textAlign'];
32
+ } else {
33
+ $class .= ' has-text-align-center';
34
+ }
35
+
36
+ if ( isset( $attributes['textColor'] ) ) {
37
+ $class .= ' has-text-color';
38
+ $class .= ' has-' . $attributes['textColor'] . '-color';
39
+ } elseif ( isset( $attributes['customTextColor'] ) ) {
40
+ $class .= ' has-text-color';
41
+ $styles .= ' color: ' . $attributes['customTextColor'] . ';';
42
+ }
43
+
44
+ if ( isset( $attributes['backgroundColor'] ) ) {
45
+ $class .= ' has-background';
46
+ $class .= ' has-' . $attributes['backgroundColor'] . '-background-color';
47
+ } elseif ( isset( $attributes['customBackgroundColor'] ) ) {
48
+ $class .= ' has-background';
49
+ $styles .= ' background-color: ' . $attributes['customBackgroundColor'] . ';';
50
+ }
51
+
52
+ if ( isset( $attributes['fontSize'] ) ) {
53
+ $class .= ' has-' . $attributes['fontSize'] . '-font-size';
54
+ } elseif ( isset( $attributes['customFontSize'] ) ) {
55
+ $styles .= ' font-size: ' . $attributes['customFontSize'] . 'px;';
56
+ } else {
57
+ $class .= ' has-small-font-size';
58
+ }
59
+
60
  $menu = wp_nav_menu(
61
  [
62
  'echo' => false,
64
  'items_wrap' => '<ul id="%1$s" class="%2$s" aria-label="submenu">%3$s</ul>',
65
  'menu_class' => 'main-menu footer-menu',
66
  'theme_location' => 'menu-1',
67
+ 'container' => '',
68
  ]
69
  );
70
 
 
 
 
 
 
71
  ob_start();
72
  // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped
73
  ?>
80
  <span class="hide-visually expanded-text"><?php esc_html_e( 'expanded', 'full-site-editing' ); ?></span>
81
  <span class="hide-visually collapsed-text"><?php esc_html_e( 'collapsed', 'full-site-editing' ); ?></span>
82
  </label>
83
+ <div class="<?php echo esc_attr( $class ); ?>" style="<?php echo esc_attr( $styles ); ?>">
84
+ <?php echo $menu ? $menu : get_fallback_navigation_menu(); ?>
85
+ </div>
86
  </nav>
87
  <!-- #site-navigation -->
88
  <?php
104
  'container' => 'ul',
105
  'echo' => false,
106
  'menu_class' => 'main-menu footer-menu',
107
+ 'sort_column' => 'menu_order, post_date',
108
  ]
109
  );
110
 
116
  $original_classes = [ 'children', 'page_item_has_sub-menu' ];
117
  $replacement_classes = [ 'sub-menu', 'menu-item-has-children' ];
118
 
119
+ return str_replace( $original_classes, $replacement_classes, $menu );
 
 
120
  }
full-site-editing/blocks/site-description/edit.js CHANGED
@@ -1,17 +1,30 @@
 
 
1
  /**
2
  * External dependencies
3
  */
4
  import classNames from 'classnames';
 
5
 
6
  /**
7
  * WordPress dependencies
8
  */
9
- import { PlainText } from '@wordpress/editor';
 
 
 
 
 
 
 
 
 
 
10
  import { compose } from '@wordpress/compose';
11
  import { withSelect, withDispatch } from '@wordpress/data';
12
  import { Fragment } from '@wordpress/element';
13
  import { __ } from '@wordpress/i18n';
14
- import { ENTER } from '@wordpress/keycodes';
15
 
16
  /**
17
  * Internal dependencies
@@ -19,14 +32,22 @@ import { ENTER } from '@wordpress/keycodes';
19
  import useSiteOptions from '../useSiteOptions';
20
 
21
  function SiteDescriptionEdit( {
 
 
22
  className,
23
  createErrorNotice,
24
- shouldUpdateSiteOption,
 
25
  isSelected,
26
  setAttributes,
27
- isLocked,
28
- insertDefaultBlock,
 
 
 
29
  } ) {
 
 
30
  const inititalDescription = __( 'Site description loading…' );
31
 
32
  const { siteOptions, handleChange } = useSiteOptions(
@@ -40,31 +61,76 @@ function SiteDescriptionEdit( {
40
 
41
  const { option } = siteOptions;
42
 
43
- const onKeyDown = event => {
44
- if ( event.keyCode !== ENTER ) {
45
- return;
46
- }
47
- event.preventDefault();
48
- if ( ! isLocked ) {
49
- insertDefaultBlock();
50
- }
51
- };
52
-
53
  return (
54
  <Fragment>
55
- <PlainText
56
- className={ classNames( 'site-description', className ) }
57
- value={ option }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
58
  onChange={ value => handleChange( value ) }
59
- onKeyDown={ onKeyDown }
 
60
  placeholder={ __( 'Add a Site Description' ) }
61
- aria-label={ __( 'Site Description' ) }
 
 
 
 
 
 
62
  />
63
  </Fragment>
64
  );
65
  }
66
 
67
  export default compose( [
 
 
68
  withSelect( ( select, { clientId } ) => {
69
  const { isSavingPost, isPublishingPost, isAutosavingPost, isCurrentPostPublished } = select(
70
  'core/editor'
1
+ /* eslint-disable wpcalypso/jsx-classname-namespace */
2
+ /* eslint-disable import/no-extraneous-dependencies */
3
  /**
4
  * External dependencies
5
  */
6
  import classNames from 'classnames';
7
+ import { noop } from 'lodash';
8
 
9
  /**
10
  * WordPress dependencies
11
  */
12
+ import {
13
+ AlignmentToolbar,
14
+ BlockControls,
15
+ ContrastChecker,
16
+ FontSizePicker,
17
+ InspectorControls,
18
+ PanelColorSettings,
19
+ RichText,
20
+ withColors,
21
+ withFontSizes,
22
+ } from '@wordpress/block-editor';
23
  import { compose } from '@wordpress/compose';
24
  import { withSelect, withDispatch } from '@wordpress/data';
25
  import { Fragment } from '@wordpress/element';
26
  import { __ } from '@wordpress/i18n';
27
+ import { PanelBody } from '@wordpress/components';
28
 
29
  /**
30
  * Internal dependencies
32
  import useSiteOptions from '../useSiteOptions';
33
 
34
  function SiteDescriptionEdit( {
35
+ attributes,
36
+ backgroundColor,
37
  className,
38
  createErrorNotice,
39
+ fontSize,
40
+ insertDefaultBlock,
41
  isSelected,
42
  setAttributes,
43
+ setBackgroundColor,
44
+ setFontSize,
45
+ setTextColor,
46
+ shouldUpdateSiteOption,
47
+ textColor,
48
  } ) {
49
+ const { textAlign } = attributes;
50
+
51
  const inititalDescription = __( 'Site description loading…' );
52
 
53
  const { siteOptions, handleChange } = useSiteOptions(
61
 
62
  const { option } = siteOptions;
63
 
 
 
 
 
 
 
 
 
 
 
64
  return (
65
  <Fragment>
66
+ <BlockControls>
67
+ <AlignmentToolbar
68
+ value={ textAlign }
69
+ onChange={ nextAlign => {
70
+ setAttributes( { textAlign: nextAlign } );
71
+ } }
72
+ />
73
+ </BlockControls>
74
+ <InspectorControls>
75
+ <PanelBody className="blocks-font-size" title={ __( 'Text Settings' ) }>
76
+ <FontSizePicker onChange={ setFontSize } value={ fontSize.size } />
77
+ </PanelBody>
78
+ <PanelColorSettings
79
+ title={ __( 'Color Settings' ) }
80
+ initialOpen={ false }
81
+ colorSettings={ [
82
+ {
83
+ value: backgroundColor.color,
84
+ onChange: setBackgroundColor,
85
+ label: __( 'Background Color' ),
86
+ },
87
+ {
88
+ value: textColor.color,
89
+ onChange: setTextColor,
90
+ label: __( 'Text Color' ),
91
+ },
92
+ ] }
93
+ >
94
+ <ContrastChecker
95
+ { ...{
96
+ textColor: textColor.color,
97
+ backgroundColor: backgroundColor.color,
98
+ } }
99
+ fontSize={ fontSize.size }
100
+ />
101
+ </PanelColorSettings>
102
+ </InspectorControls>
103
+ <RichText
104
+ allowedFormats={ [] }
105
+ aria-label={ __( 'Site Description' ) }
106
+ className={ classNames( 'site-description', className, {
107
+ 'has-text-color': textColor.color,
108
+ 'has-background': backgroundColor.color,
109
+ [ `has-text-align-${ textAlign }` ]: textAlign,
110
+ [ backgroundColor.class ]: backgroundColor.class,
111
+ [ textColor.class ]: textColor.class,
112
+ [ fontSize.class ]: fontSize.class,
113
+ } ) }
114
+ identifier="content"
115
  onChange={ value => handleChange( value ) }
116
+ onReplace={ insertDefaultBlock }
117
+ onSplit={ noop }
118
  placeholder={ __( 'Add a Site Description' ) }
119
+ style={ {
120
+ backgroundColor: backgroundColor.color,
121
+ color: textColor.color,
122
+ fontSize: fontSize.size ? fontSize.size + 'px' : undefined,
123
+ } }
124
+ tagName="p"
125
+ value={ option }
126
  />
127
  </Fragment>
128
  );
129
  }
130
 
131
  export default compose( [
132
+ withColors( 'backgroundColor', { textColor: 'color' } ),
133
+ withFontSizes( 'fontSize' ),
134
  withSelect( ( select, { clientId } ) => {
135
  const { isSavingPost, isPublishingPost, isAutosavingPost, isCurrentPostPublished } = select(
136
  'core/editor'
full-site-editing/blocks/site-description/index.js CHANGED
@@ -32,6 +32,29 @@ registerBlockType( 'a8c/site-description', {
32
  type: 'string',
33
  default: 'wide',
34
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35
  },
36
  edit,
37
  save: () => null,
32
  type: 'string',
33
  default: 'wide',
34
  },
35
+ textAlign: {
36
+ type: 'string',
37
+ default: 'center',
38
+ },
39
+ textColor: {
40
+ type: 'string',
41
+ },
42
+ customTextColor: {
43
+ type: 'string',
44
+ },
45
+ backgroundColor: {
46
+ type: 'string',
47
+ },
48
+ customBackgroundColor: {
49
+ type: 'string',
50
+ },
51
+ fontSize: {
52
+ type: 'string',
53
+ default: 'small',
54
+ },
55
+ customFontSize: {
56
+ type: 'number',
57
+ },
58
  },
59
  edit,
60
  save: () => null,
full-site-editing/blocks/site-description/index.php CHANGED
@@ -16,6 +16,8 @@ namespace A8C\FSE;
16
  function render_site_description_block( $attributes ) {
17
  ob_start();
18
 
 
 
19
  $class = 'site-description wp-block-a8c-site-description';
20
  if ( isset( $attributes['className'] ) ) {
21
  $class .= ' ' . $attributes['className'];
@@ -27,8 +29,38 @@ function render_site_description_block( $attributes ) {
27
  }
28
  $class .= $align;
29
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30
  ?>
31
- <p class="<?php echo esc_attr( $class ); ?>">
32
  <?php bloginfo( 'description' ); ?>
33
  </p>
34
  <?php
16
  function render_site_description_block( $attributes ) {
17
  ob_start();
18
 
19
+ $styles = '';
20
+
21
  $class = 'site-description wp-block-a8c-site-description';
22
  if ( isset( $attributes['className'] ) ) {
23
  $class .= ' ' . $attributes['className'];
29
  }
30
  $class .= $align;
31
 
32
+ if ( isset( $attributes['textAlign'] ) ) {
33
+ $class .= ' has-text-align-' . $attributes['textAlign'];
34
+ } else {
35
+ $class .= ' has-text-align-center';
36
+ }
37
+
38
+ if ( isset( $attributes['textColor'] ) ) {
39
+ $class .= ' has-text-color';
40
+ $class .= ' has-' . $attributes['textColor'] . '-color';
41
+ } elseif ( isset( $attributes['customTextColor'] ) ) {
42
+ $class .= ' has-text-color';
43
+ $styles .= ' color: ' . $attributes['customTextColor'] . ';';
44
+ }
45
+
46
+ if ( isset( $attributes['backgroundColor'] ) ) {
47
+ $class .= ' has-background';
48
+ $class .= ' has-' . $attributes['backgroundColor'] . '-background-color';
49
+ } elseif ( isset( $attributes['customBackgroundColor'] ) ) {
50
+ $class .= ' has-background';
51
+ $styles .= ' background-color: ' . $attributes['customBackgroundColor'] . ';';
52
+ }
53
+
54
+ if ( isset( $attributes['fontSize'] ) ) {
55
+ $class .= ' has-' . $attributes['fontSize'] . '-font-size';
56
+ } elseif ( isset( $attributes['customFontSize'] ) ) {
57
+ $styles .= ' font-size: ' . $attributes['customFontSize'] . 'px;';
58
+ } else {
59
+ $class .= ' has-small-font-size';
60
+ }
61
+
62
  ?>
63
+ <p class="<?php echo esc_attr( $class ); ?>" style="<?php echo esc_attr( $styles ); ?>">
64
  <?php bloginfo( 'description' ); ?>
65
  </p>
66
  <?php
full-site-editing/blocks/site-title/edit.js CHANGED
@@ -1,17 +1,29 @@
 
 
1
  /**
2
  * External dependencies
3
  */
4
  import classNames from 'classnames';
 
5
 
6
  /**
7
  * WordPress dependencies
8
  */
9
  import { __ } from '@wordpress/i18n';
10
- import { PlainText } from '@wordpress/editor';
 
 
 
 
 
 
 
 
 
11
  import { withSelect, withDispatch } from '@wordpress/data';
12
  import { compose } from '@wordpress/compose';
13
  import { Fragment } from '@wordpress/element';
14
- import { ENTER } from '@wordpress/keycodes';
15
 
16
  /**
17
  * Internal dependencies
@@ -19,15 +31,22 @@ import { ENTER } from '@wordpress/keycodes';
19
  import useSiteOptions from '../useSiteOptions';
20
 
21
  function SiteTitleEdit( {
 
22
  className,
23
  createErrorNotice,
24
- shouldUpdateSiteOption,
 
25
  isSelected,
26
  setAttributes,
27
- isLocked,
28
- insertDefaultBlock,
 
 
29
  } ) {
 
 
30
  const inititalTitle = __( 'Site title loading…' );
 
31
  const { siteOptions, handleChange } = useSiteOptions(
32
  'title',
33
  inititalTitle,
@@ -39,31 +58,60 @@ function SiteTitleEdit( {
39
 
40
  const { option } = siteOptions;
41
 
42
- const onKeyDown = event => {
43
- if ( event.keyCode !== ENTER ) {
44
- return;
45
- }
46
- event.preventDefault();
47
- if ( ! isLocked ) {
48
- insertDefaultBlock();
49
- }
50
- };
51
-
52
  return (
53
  <Fragment>
54
- <PlainText
55
- className={ classNames( 'site-title', className ) }
56
- value={ option }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
57
  onChange={ value => handleChange( value ) }
58
- onKeyDown={ onKeyDown }
 
59
  placeholder={ __( 'Add a Site Title' ) }
60
- aria-label={ __( 'Site Title' ) }
 
 
 
 
 
61
  />
62
  </Fragment>
63
  );
64
  }
65
 
66
  export default compose( [
 
 
67
  withSelect( ( select, { clientId } ) => {
68
  const { isSavingPost, isPublishingPost, isAutosavingPost, isCurrentPostPublished } = select(
69
  'core/editor'
1
+ /* eslint-disable wpcalypso/jsx-classname-namespace */
2
+ /* eslint-disable import/no-extraneous-dependencies */
3
  /**
4
  * External dependencies
5
  */
6
  import classNames from 'classnames';
7
+ import { noop } from 'lodash';
8
 
9
  /**
10
  * WordPress dependencies
11
  */
12
  import { __ } from '@wordpress/i18n';
13
+ import {
14
+ AlignmentToolbar,
15
+ BlockControls,
16
+ FontSizePicker,
17
+ InspectorControls,
18
+ PanelColorSettings,
19
+ RichText,
20
+ withColors,
21
+ withFontSizes,
22
+ } from '@wordpress/block-editor';
23
  import { withSelect, withDispatch } from '@wordpress/data';
24
  import { compose } from '@wordpress/compose';
25
  import { Fragment } from '@wordpress/element';
26
+ import { PanelBody } from '@wordpress/components';
27
 
28
  /**
29
  * Internal dependencies
31
  import useSiteOptions from '../useSiteOptions';
32
 
33
  function SiteTitleEdit( {
34
+ attributes,
35
  className,
36
  createErrorNotice,
37
+ fontSize,
38
+ insertDefaultBlock,
39
  isSelected,
40
  setAttributes,
41
+ setFontSize,
42
+ setTextColor,
43
+ shouldUpdateSiteOption,
44
+ textColor,
45
  } ) {
46
+ const { textAlign } = attributes;
47
+
48
  const inititalTitle = __( 'Site title loading…' );
49
+
50
  const { siteOptions, handleChange } = useSiteOptions(
51
  'title',
52
  inititalTitle,
58
 
59
  const { option } = siteOptions;
60
 
 
 
 
 
 
 
 
 
 
 
61
  return (
62
  <Fragment>
63
+ <BlockControls>
64
+ <AlignmentToolbar
65
+ value={ textAlign }
66
+ onChange={ nextAlign => {
67
+ setAttributes( { textAlign: nextAlign } );
68
+ } }
69
+ />
70
+ </BlockControls>
71
+ <InspectorControls>
72
+ <PanelBody className="blocks-font-size" title={ __( 'Text Settings' ) }>
73
+ <FontSizePicker onChange={ setFontSize } value={ fontSize.size } />
74
+ </PanelBody>
75
+ <PanelColorSettings
76
+ title={ __( 'Color Settings' ) }
77
+ initialOpen={ false }
78
+ colorSettings={ [
79
+ {
80
+ value: textColor.color,
81
+ onChange: setTextColor,
82
+ label: __( 'Text Color' ),
83
+ },
84
+ ] }
85
+ />
86
+ </InspectorControls>
87
+ <RichText
88
+ allowedFormats={ [] }
89
+ aria-label={ __( 'Site Title' ) }
90
+ className={ classNames( 'site-title', className, {
91
+ 'has-text-color': textColor.color,
92
+ [ `has-text-align-${ textAlign }` ]: textAlign,
93
+ [ textColor.class ]: textColor.class,
94
+ [ fontSize.class ]: fontSize.class,
95
+ } ) }
96
+ identifier="content"
97
  onChange={ value => handleChange( value ) }
98
+ onReplace={ insertDefaultBlock }
99
+ onSplit={ noop }
100
  placeholder={ __( 'Add a Site Title' ) }
101
+ style={ {
102
+ color: textColor.color,
103
+ fontSize: fontSize.size ? fontSize.size + 'px' : undefined,
104
+ } }
105
+ tagName="h1"
106
+ value={ option }
107
  />
108
  </Fragment>
109
  );
110
  }
111
 
112
  export default compose( [
113
+ withColors( { textColor: 'color' } ),
114
+ withFontSizes( 'fontSize' ),
115
  withSelect( ( select, { clientId } ) => {
116
  const { isSavingPost, isPublishingPost, isAutosavingPost, isCurrentPostPublished } = select(
117
  'core/editor'
full-site-editing/blocks/site-title/index.js CHANGED
@@ -27,6 +27,23 @@ registerBlockType( 'a8c/site-title', {
27
  type: 'string',
28
  default: 'wide',
29
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30
  },
31
  edit,
32
  save: () => null,
27
  type: 'string',
28
  default: 'wide',
29
  },
30
+ textAlign: {
31
+ type: 'string',
32
+ default: 'center',
33
+ },
34
+ textColor: {
35
+ type: 'string',
36
+ },
37
+ customTextColor: {
38
+ type: 'string',
39
+ },
40
+ fontSize: {
41
+ type: 'string',
42
+ default: 'normal',
43
+ },
44
+ customFontSize: {
45
+ type: 'number',
46
+ },
47
  },
48
  edit,
49
  save: () => null,
full-site-editing/blocks/site-title/index.php CHANGED
@@ -16,6 +16,8 @@ namespace A8C\FSE;
16
  function render_site_title_block( $attributes ) {
17
  ob_start();
18
 
 
 
19
  $class = 'site-title wp-block-a8c-site-title';
20
  if ( isset( $attributes['className'] ) ) {
21
  $class .= ' ' . $attributes['className'];
@@ -27,8 +29,30 @@ function render_site_title_block( $attributes ) {
27
  }
28
  $class .= $align;
29
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30
  ?>
31
- <h1 class="<?php echo esc_attr( $class ); ?>">
32
  <a href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php bloginfo( 'name' ); ?></a>
33
  </h1>
34
  <!-- a8c:site-title -->
16
  function render_site_title_block( $attributes ) {
17
  ob_start();
18
 
19
+ $styles = '';
20
+
21
  $class = 'site-title wp-block-a8c-site-title';
22
  if ( isset( $attributes['className'] ) ) {
23
  $class .= ' ' . $attributes['className'];
29
  }
30
  $class .= $align;
31
 
32
+ if ( isset( $attributes['textAlign'] ) ) {
33
+ $class .= ' has-text-align-' . $attributes['textAlign'];
34
+ } else {
35
+ $class .= ' has-text-align-center';
36
+ }
37
+
38
+ if ( isset( $attributes['textColor'] ) ) {
39
+ $class .= ' has-text-color';
40
+ $class .= ' has-' . $attributes['textColor'] . '-color';
41
+ } elseif ( isset( $attributes['customTextColor'] ) ) {
42
+ $class .= ' has-text-color';
43
+ $styles .= ' color: ' . $attributes['customTextColor'] . ';';
44
+ }
45
+
46
+ if ( isset( $attributes['fontSize'] ) ) {
47
+ $class .= ' has-' . $attributes['fontSize'] . '-font-size';
48
+ } elseif ( isset( $attributes['customFontSize'] ) ) {
49
+ $styles .= ' font-size: ' . $attributes['customFontSize'] . 'px;';
50
+ } else {
51
+ $class .= ' has-normal-font-size';
52
+ }
53
+
54
  ?>
55
+ <h1 class="<?php echo esc_attr( $class ); ?>" style="<?php echo esc_attr( $styles ); ?>">
56
  <a href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php bloginfo( 'name' ); ?></a>
57
  </h1>
58
  <!-- a8c:site-title -->
full-site-editing/blocks/template/style.scss CHANGED
@@ -38,6 +38,13 @@
38
  .block-editor-block-list__block-edit::before {
39
  display: none;
40
  }
 
 
 
 
 
 
 
41
  }
42
 
43
  .template-block__overlay {
38
  .block-editor-block-list__block-edit::before {
39
  display: none;
40
  }
41
+
42
+ @media ( min-width: 600px ) {
43
+ .block-editor-block-list__layout .block-editor-block-list__block[data-align='full'] {
44
+ margin-left: 14px;
45
+ margin-right: 14px;
46
+ }
47
+ }
48
  }
49
 
50
  .template-block__overlay {
full-site-editing/class-full-site-editing.php CHANGED
@@ -197,9 +197,36 @@ class Full_Site_Editing {
197
  'a8c/navigation-menu',
198
  array(
199
  'attributes' => [
200
- 'className' => [
 
201
  'default' => '',
 
 
 
 
 
 
202
  'type' => 'string',
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
203
  ],
204
  ],
205
  'render_callback' => __NAMESPACE__ . '\render_navigation_menu_block',
197
  'a8c/navigation-menu',
198
  array(
199
  'attributes' => [
200
+ 'className' => [
201
+ 'type' => 'string',
202
  'default' => '',
203
+ ],
204
+ 'align' => [
205
+ 'type' => 'string',
206
+ 'default' => 'wide',
207
+ ],
208
+ 'textAlign' => [
209
  'type' => 'string',
210
+ 'default' => 'center',
211
+ ],
212
+ 'textColor' => [
213
+ 'type' => 'string',
214
+ ],
215
+ 'customTextColor' => [
216
+ 'type' => 'string',
217
+ ],
218
+ 'backgroundColor' => [
219
+ 'type' => 'string',
220
+ ],
221
+ 'customBackgroundColor' => [
222
+ 'type' => 'string',
223
+ ],
224
+ 'fontSize' => [
225
+ 'type' => 'string',
226
+ 'default' => 'normal',
227
+ ],
228
+ 'customFontSize' => [
229
+ 'type' => 'number',
230
  ],
231
  ],
232
  'render_callback' => __NAMESPACE__ . '\render_navigation_menu_block',
full-site-editing/dist/full-site-editing.css CHANGED
@@ -1 +1 @@
1
- .wp-block-a8c-navigation-menu.main-navigation{pointer-events:none}.post-content-block.alignfull{padding:0 12px}@media (max-width:768px){.post-content-block.alignfull{overflow-x:hidden}}.post-content-block__selector{width:300px}.post-content-block__selector a{font-family:sans-serif;font-size:13px;padding-left:8px}.post-content-block__preview{pointer-events:none}.post-content-block__preview:after{content:"";clear:both;display:table}.post-content-block .editor-post-title,.show-post-title-before-content .editor-post-title{display:none}.show-post-title-before-content .post-content-block .editor-post-title{display:block}@media (max-width:768px){.post-content-block .block-editor-block-list__layout .block-editor-block-list__block[data-align=full]{max-width:768px;margin-left:0;margin-right:0}.post-content-block .block-editor-block-list__layout .block-editor-block-list__block[data-align=full] .block-editor-block-mover{left:60px}}@media (min-width:768px){.post-content-block .block-editor-block-list__layout .block-editor-block-list__block[data-align=full]{max-width:calc(100vw - 81px);margin-left:3px;margin-right:3px}}.block-editor-block-list__layout .post-content__block.is-selected .block-editor-block-contextual-toolbar{display:none}.block-editor-block-list__layout .post-content__block.block-editor-block-list__block.has-child-selected>.block-editor-block-list__block-edit:before,.block-editor-block-list__layout .post-content__block.block-editor-block-list__block.is-hovered>.block-editor-block-list__block-edit:before,.block-editor-block-list__layout .post-content__block.block-editor-block-list__block.is-navigate-mode>.block-editor-block-list__block-edit:before,.block-editor-block-list__layout .post-content__block.block-editor-block-list__block>.block-editor-block-list__block-edit:before{transition:none;border:none;outline:none;box-shadow:none}.block-editor-block-list__layout .post-content__block.block-editor-block-list__block.has-child-selected>.block-editor-block-list__block-edit>.block-editor-block-list__breadcrumb,.block-editor-block-list__layout .post-content__block.block-editor-block-list__block.is-hovered>.block-editor-block-list__block-edit>.block-editor-block-list__breadcrumb,.block-editor-block-list__layout .post-content__block.block-editor-block-list__block.is-navigate-mode>.block-editor-block-list__block-edit>.block-editor-block-list__breadcrumb,.block-editor-block-list__layout .post-content__block.block-editor-block-list__block>.block-editor-block-list__block-edit>.block-editor-block-list__breadcrumb{display:none}.block-editor .wp-block-a8c-site-description:focus{box-shadow:none;background-color:transparent}.block-editor .wp-block.is-selected .wp-block-a8c-site-description::-webkit-input-placeholder{color:transparent}.block-editor .wp-block.is-selected .wp-block-a8c-site-description:-moz-placeholder,.block-editor .wp-block.is-selected .wp-block-a8c-site-description::-moz-placeholder{color:transparent}.block-editor .wp-block.is-selected .wp-block-a8c-site-description:-ms-input-placeholder{color:transparent}.block-editor .wp-block-a8c-site-title:focus{box-shadow:none;background-color:transparent}.block-editor .wp-block.is-selected .wp-block-a8c-site-title::-webkit-input-placeholder{color:transparent}.block-editor .wp-block.is-selected .wp-block-a8c-site-title:-moz-placeholder,.block-editor .wp-block.is-selected .wp-block-a8c-site-title::-moz-placeholder{color:transparent}.block-editor .wp-block.is-selected .wp-block-a8c-site-title:-ms-input-placeholder{color:transparent}.template-block{min-height:200px;overflow:hidden;position:relative}.template__block-container.is-hovered{cursor:pointer}.template__block-container.is-hovered .components-disabled,.template__block-container .is-navigating-to-template .components-disabled,.template__block-container.is-selected .components-disabled{filter:blur(2px);transition:filter .2s linear .7s}.template__block-container.is-hovered .template-block__overlay,.template__block-container .is-navigating-to-template .template-block__overlay,.template__block-container.is-selected .template-block__overlay{opacity:1;transition:opacity .2s linear}.template__block-container.is-hovered .template-block__overlay .components-button,.template__block-container .is-navigating-to-template .template-block__overlay .components-button,.template__block-container.is-selected .template-block__overlay .components-button{opacity:1;transition:opacity .2s linear .7s}.template__block-container .components-disabled{filter:blur(0);transition:filter .2s linear 0s}.template__block-container .block-editor-block-contextual-toolbar,.template__block-container .block-editor-block-list__block-edit:before,.template__block-container .block-editor-block-list__block-mobile-toolbar,.template__block-container .block-editor-block-list__breadcrumb,.template__block-container .block-editor-block-list__insertion-point{display:none}.template-block__overlay{background:hsla(0,0%,100%,.8);border:0 solid rgba(123,134,162,.3);bottom:0;left:0;margin:0;opacity:0;padding:0;position:absolute;right:0;transition:opacity .2s linear 0s;top:0;z-index:2}.is-selected .template-block__overlay{border-color:rgba(66,88,99,.4)}.editor-block-list__block:first-child .template-block__overlay{border-bottom-width:1px}.editor-block-list__block:last-child .template-block__overlay{border-top-width:1px}@media only screen and (min-width:768px){.template-block__overlay{border-width:1px}}.template-block__overlay .components-button{opacity:0;transition:opacity .2s linear 0s}.template-block__overlay .components-button.hidden{display:none}.template-block__loading{display:flex;align-items:center;color:#191e23}.block-editor-page:not(.post-type-wp_template_part) .fse-site-logo .components-placeholder__fieldset,.block-editor-page:not(.post-type-wp_template_part) .fse-site-logo .components-placeholder__instructions,.post-type-wp_template_part .edit-post-post-status,.post-type-wp_template_part .editor-post-title,.post-type-wp_template_part .editor-post-trash{display:none}.post-type-wp_template_part .edit-post-visual-editor{margin-top:20px;padding-top:0}.post-type-wp_template_part .editor-post-switch-to-draft{display:none}@media (min-width:768px){.post-type-page .edit-post-layout__content,.post-type-wp_template_part .edit-post-layout__content{background:#eee}.post-type-page .edit-post-layout__content .edit-post-visual-editor,.post-type-wp_template_part .edit-post-layout__content .edit-post-visual-editor{box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.12),0 1px 5px 0 rgba(0,0,0,.2);flex:none;margin:36px 32px}}.post-type-page .editor-writing-flow__click-redirect,.post-type-wp_template_part .editor-writing-flow__click-redirect{display:none}.editor-styles-wrapper{background:#fff}.post-type-page .edit-post-visual-editor{padding-top:0}.post-type-page .block-editor-writing-flow{display:block}.post-type-page .wp-block.template__block-container [data-block]{margin:0}
1
+ .wp-block-a8c-navigation-menu.main-navigation{pointer-events:none}.post-content-block.alignfull{padding:0 12px}@media (max-width:768px){.post-content-block.alignfull{overflow-x:hidden}}.post-content-block__selector{width:300px}.post-content-block__selector a{font-family:sans-serif;font-size:13px;padding-left:8px}.post-content-block__preview{pointer-events:none}.post-content-block__preview:after{content:"";clear:both;display:table}.post-content-block .editor-post-title,.show-post-title-before-content .editor-post-title{display:none}.show-post-title-before-content .post-content-block .editor-post-title{display:block}@media (max-width:768px){.post-content-block .block-editor-block-list__layout .block-editor-block-list__block[data-align=full]{max-width:768px;margin-left:0;margin-right:0}.post-content-block .block-editor-block-list__layout .block-editor-block-list__block[data-align=full] .block-editor-block-mover{left:60px}}@media (min-width:768px){.post-content-block .block-editor-block-list__layout .block-editor-block-list__block[data-align=full]{max-width:calc(100vw - 81px);margin-left:3px;margin-right:3px}}.block-editor-block-list__layout .post-content__block.is-selected .block-editor-block-contextual-toolbar{display:none}.block-editor-block-list__layout .post-content__block.block-editor-block-list__block.has-child-selected>.block-editor-block-list__block-edit:before,.block-editor-block-list__layout .post-content__block.block-editor-block-list__block.is-hovered>.block-editor-block-list__block-edit:before,.block-editor-block-list__layout .post-content__block.block-editor-block-list__block.is-navigate-mode>.block-editor-block-list__block-edit:before,.block-editor-block-list__layout .post-content__block.block-editor-block-list__block>.block-editor-block-list__block-edit:before{transition:none;border:none;outline:none;box-shadow:none}.block-editor-block-list__layout .post-content__block.block-editor-block-list__block.has-child-selected>.block-editor-block-list__block-edit>.block-editor-block-list__breadcrumb,.block-editor-block-list__layout .post-content__block.block-editor-block-list__block.is-hovered>.block-editor-block-list__block-edit>.block-editor-block-list__breadcrumb,.block-editor-block-list__layout .post-content__block.block-editor-block-list__block.is-navigate-mode>.block-editor-block-list__block-edit>.block-editor-block-list__breadcrumb,.block-editor-block-list__layout .post-content__block.block-editor-block-list__block>.block-editor-block-list__block-edit>.block-editor-block-list__breadcrumb{display:none}.block-editor .wp-block-a8c-site-description:focus{box-shadow:none;background-color:transparent}.block-editor .wp-block.is-selected .wp-block-a8c-site-description::-webkit-input-placeholder{color:transparent}.block-editor .wp-block.is-selected .wp-block-a8c-site-description:-moz-placeholder,.block-editor .wp-block.is-selected .wp-block-a8c-site-description::-moz-placeholder{color:transparent}.block-editor .wp-block.is-selected .wp-block-a8c-site-description:-ms-input-placeholder{color:transparent}.block-editor .wp-block-a8c-site-title:focus{box-shadow:none;background-color:transparent}.block-editor .wp-block.is-selected .wp-block-a8c-site-title::-webkit-input-placeholder{color:transparent}.block-editor .wp-block.is-selected .wp-block-a8c-site-title:-moz-placeholder,.block-editor .wp-block.is-selected .wp-block-a8c-site-title::-moz-placeholder{color:transparent}.block-editor .wp-block.is-selected .wp-block-a8c-site-title:-ms-input-placeholder{color:transparent}.template-block{min-height:200px;overflow:hidden;position:relative}.template__block-container.is-hovered{cursor:pointer}.template__block-container.is-hovered .components-disabled,.template__block-container .is-navigating-to-template .components-disabled,.template__block-container.is-selected .components-disabled{filter:blur(2px);transition:filter .2s linear .7s}.template__block-container.is-hovered .template-block__overlay,.template__block-container .is-navigating-to-template .template-block__overlay,.template__block-container.is-selected .template-block__overlay{opacity:1;transition:opacity .2s linear}.template__block-container.is-hovered .template-block__overlay .components-button,.template__block-container .is-navigating-to-template .template-block__overlay .components-button,.template__block-container.is-selected .template-block__overlay .components-button{opacity:1;transition:opacity .2s linear .7s}.template__block-container .components-disabled{filter:blur(0);transition:filter .2s linear 0s}.template__block-container .block-editor-block-contextual-toolbar,.template__block-container .block-editor-block-list__block-edit:before,.template__block-container .block-editor-block-list__block-mobile-toolbar,.template__block-container .block-editor-block-list__breadcrumb,.template__block-container .block-editor-block-list__insertion-point{display:none}@media (min-width:600px){.template__block-container .block-editor-block-list__layout .block-editor-block-list__block[data-align=full]{margin-left:14px;margin-right:14px}}.template-block__overlay{background:hsla(0,0%,100%,.8);border:0 solid rgba(123,134,162,.3);bottom:0;left:0;margin:0;opacity:0;padding:0;position:absolute;right:0;transition:opacity .2s linear 0s;top:0;z-index:2}.is-selected .template-block__overlay{border-color:rgba(66,88,99,.4)}.editor-block-list__block:first-child .template-block__overlay{border-bottom-width:1px}.editor-block-list__block:last-child .template-block__overlay{border-top-width:1px}@media only screen and (min-width:768px){.template-block__overlay{border-width:1px}}.template-block__overlay .components-button{opacity:0;transition:opacity .2s linear 0s}.template-block__overlay .components-button.hidden{display:none}.template-block__loading{display:flex;align-items:center;color:#191e23}.block-editor-page:not(.post-type-wp_template_part) .fse-site-logo .components-placeholder__fieldset,.block-editor-page:not(.post-type-wp_template_part) .fse-site-logo .components-placeholder__instructions,.post-type-wp_template_part .edit-post-post-status,.post-type-wp_template_part .editor-post-title,.post-type-wp_template_part .editor-post-trash{display:none}.post-type-wp_template_part .edit-post-visual-editor{margin-top:20px;padding-top:0}.post-type-wp_template_part .editor-post-switch-to-draft{display:none}@media (min-width:768px){.post-type-page .edit-post-layout__content,.post-type-wp_template_part .edit-post-layout__content{background:#eee}.post-type-page .edit-post-layout__content .edit-post-visual-editor,.post-type-wp_template_part .edit-post-layout__content .edit-post-visual-editor{box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.12),0 1px 5px 0 rgba(0,0,0,.2);flex:none;margin:36px 32px}}.post-type-page .editor-writing-flow__click-redirect,.post-type-wp_template_part .editor-writing-flow__click-redirect{display:none}.editor-styles-wrapper{background:#fff}.post-type-page .edit-post-visual-editor{padding-top:0}.post-type-page .block-editor-writing-flow{display:block}.post-type-page .wp-block.template__block-container [data-block]{margin:0}
full-site-editing/dist/full-site-editing.deps.json CHANGED
@@ -1 +1 @@
1
- ["lodash","wp-api-fetch","wp-blocks","wp-components","wp-compose","wp-data","wp-dom-ready","wp-editor","wp-element","wp-hooks","wp-html-entities","wp-i18n","wp-keycodes","wp-plugins","wp-polyfill","wp-server-side-render","wp-url"]
1
+ ["lodash","wp-api-fetch","wp-block-editor","wp-blocks","wp-components","wp-compose","wp-data","wp-dom-ready","wp-editor","wp-element","wp-hooks","wp-html-entities","wp-i18n","wp-plugins","wp-polyfill","wp-server-side-render","wp-url"]
full-site-editing/dist/full-site-editing.js CHANGED
@@ -1,4 +1,4 @@
1
- !function(t,e){for(var n in e)t[n]=e[n]}(window,function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=42)}([function(t,e){!function(){t.exports=this.wp.element}()},function(t,e){!function(){t.exports=this.wp.i18n}()},function(t,e){!function(){t.exports=this.wp.data}()},function(t,e){!function(){t.exports=this.wp.compose}()},function(t,e){!function(){t.exports=this.wp.blocks}()},function(t,e){!function(){t.exports=this.wp.editor}()},function(t,e,n){var r=n(10);function o(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}t.exports=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?o(n,!0).forEach(function(e){r(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):o(n).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}},function(t,e){!function(){t.exports=this.lodash}()},function(t,e,n){var r;
2
  /*!
3
  Copyright (c) 2017 Jed Watson.
4
  Licensed under the MIT License (MIT), see
@@ -9,4 +9,4 @@
9
  Licensed under the MIT License (MIT), see
10
  http://jedwatson.github.io/classnames
11
  */
12
- !function(){"use strict";var n={}.hasOwnProperty;function o(){for(var t=[],e=0;e<arguments.length;e++){var r=arguments[e];if(r){var i=typeof r;if("string"===i||"number"===i)t.push(r);else if(Array.isArray(r)&&r.length){var c=o.apply(null,r);c&&t.push(c)}else if("object"===i)for(var a in r)n.call(r,a)&&r[a]&&t.push(a)}}return t.join(" ")}t.exports?(o.default=o,t.exports=o):void 0===(r=function(){return o}.apply(e,[]))||(t.exports=r)}()},function(t,e){!function(){t.exports=this.wp.hooks}()},function(t,e){t.exports=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}},function(t,e){!function(){t.exports=this.wp.components}()},function(t,e){function n(){return t.exports=n=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},n.apply(this,arguments)}t.exports=n},function(t,e){!function(){t.exports=this.wp.domReady}()},function(t,e){!function(){t.exports=this.wp.keycodes}()},function(t,e,n){var r=n(33),o=n(34),i=n(35);t.exports=function(t,e){return r(t)||o(t,e)||i()}},function(t,e){!function(){t.exports=this.wp.apiFetch}()},function(t,e){!function(){t.exports=this.wp.htmlEntities}()},function(t,e,n){},function(t,e){!function(){t.exports=this.wp.serverSideRender}()},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e){function n(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}t.exports=function(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),t}},function(t,e,n){var r=n(29),o=n(30);t.exports=function(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?o(t):e}},function(t,e){function n(e){return t.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},n(e)}t.exports=n},function(t,e,n){var r=n(31);t.exports=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&r(t,e)}},function(t,e){!function(){t.exports=this.wp.url}()},function(t,e,n){var r=n(38),o=n(39),i=n(40);t.exports=function(t){return r(t)||o(t)||i()}},function(t,e){!function(){t.exports=this.wp.plugins}()},function(t,e,n){},function(t,e){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(e){return"function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?t.exports=r=function(t){return n(t)}:t.exports=r=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":n(t)},r(e)}t.exports=r},function(t,e){t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}},function(t,e){function n(e,r){return t.exports=n=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},n(e,r)}t.exports=n},function(t,e,n){},function(t,e){t.exports=function(t){if(Array.isArray(t))return t}},function(t,e){t.exports=function(t,e){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t)){var n=[],r=!0,o=!1,i=void 0;try{for(var c,a=t[Symbol.iterator]();!(r=(c=a.next()).done)&&(n.push(c.value),!e||n.length!==e);r=!0);}catch(l){o=!0,i=l}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}return n}}},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}},function(t,e,n){},function(t,e,n){},function(t,e){t.exports=function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}},function(t,e){t.exports=function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}},function(t,e,n){},function(t,e,n){"use strict";n.r(e);var r=n(0),o=n(4),i=n(1),c=n(19),a=n.n(c),l=function(){return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(a.a,{block:"a8c/navigation-menu"}))},s=(n(28),Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(r.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(r.createElement)("path",{d:"M12 7.27l4.28 10.43-3.47-1.53-.81-.36-.81.36-3.47 1.53L12 7.27M12 2L4.5 20.29l.71.71L12 18l6.79 3 .71-.71L12 2z"})));Object(o.registerBlockType)("a8c/navigation-menu",{title:Object(i.__)("Navigation Menu"),description:Object(i.__)("Visual placeholder for site-wide navigation and menus."),icon:s,category:"layout",supports:{align:["wide","full"],html:!1,reusable:!1},attributes:{align:{type:"string",default:"wide"}},edit:l,save:function(){return null}});var u=n(12),p=n.n(u),d=n(3),f=n(9),b=n(10),m=n.n(b),O=n(20),g=n.n(O),y=n(21),v=n.n(y),h=n(22),j=n.n(h),E=n(23),_=n.n(E),w=n(24),S=n.n(w),k=n(8),P=n.n(k),x=n(2),T=n(5),I=function(t){function e(){return g()(this,e),j()(this,_()(e).apply(this,arguments))}return S()(e,t),v()(e,[{key:"toggleEditing",value:function(){var t=this.props,e=t.isEditing;(0,t.setState)({isEditing:!e})}},{key:"onSelectPost",value:function(t){var e=t.id,n=t.type;this.props.setState({isEditing:!1,selectedPostId:e,selectedPostType:n})}},{key:"render",value:function(){var t=this.props.attributes.align;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)("div",{className:P()("post-content-block",m()({},"align".concat(t),t))},Object(r.createElement)(T.PostTitle,null),Object(r.createElement)(T.InnerBlocks,{templateLock:!1})))}}]),e}(r.Component),B=Object(d.compose)([Object(d.withState)({isEditing:!1,selectedPostId:void 0,selectedPostType:void 0}),Object(x.withSelect)(function(t,e){var n=e.selectedPostId,r=e.selectedPostType;return{selectedPost:(0,t("core").getEntityRecord)("postType",r,n)}})])(I);n(32);Object(o.registerBlockType)("a8c/post-content",{title:Object(i.__)("Content"),description:Object(i.__)("The page content."),icon:"layout",category:"layout",supports:{align:["full"],anchor:!1,customClassName:!1,html:!1,inserter:!1,multiple:!1,reusable:!1},attributes:{align:{type:"string",default:"full"}},edit:B,save:function(){return Object(r.createElement)(T.InnerBlocks.Content,null)}});var C=Object(d.createHigherOrderComponent)(function(t){return function(e){return"a8c/post-content"!==e.name?Object(r.createElement)(t,e):Object(r.createElement)(t,p()({},e,{className:"post-content__block"}))}},"addContentSlotClassname");Object(f.addFilter)("editor.BlockListBlock","full-site-editing/blocks/post-content",C,9);var D=n(14),N=n(6),A=n.n(N),L=n(15),F=n.n(L),M=n(16),R=n.n(M),U=n(17);function H(t){var e=Object(r.useRef)();return Object(r.useEffect)(function(){e.current=t},[t]),e.current}function q(t,e,n,o,c,a){var l=Object(r.useState)({option:e,previousOption:"",loaded:!1,error:!1}),s=F()(l,2),u=s[0],p=s[1],d=H(o),f=H(c);function b(){p(A()({},u,{option:u.previousOption,isSaving:!1}))}return Object(r.useEffect)(function(){u.loaded||u.error?function(){var e=u.option,r=u.previousOption,a=e&&e.trim()===r.trim(),l=!e||0===e.trim().length;!o&&d&&l&&b();if(!c||a)return;!f&&c&&function(e){p(A()({},u,{isSaving:!0})),R()({path:"/wp/v2/settings",method:"POST",data:m()({},t,e)}).then(function(){return function(t){p(A()({},u,{previousOption:t,isDirty:!1,isSaving:!1}))}(e)}).catch(function(){n(Object(i.sprintf)(Object(i.__)("Unable to save site %s"),t)),b()})}(e)}():R()({path:"/wp/v2/settings"}).then(function(e){return p(A()({},u,{option:Object(U.decodeEntities)(e[t]),previousOption:Object(U.decodeEntities)(e[t]),loaded:!0,error:!1}))}).catch(function(){n(Object(i.sprintf)(Object(i.__)("Unable to load site %s"),t)),p(A()({},u,{option:Object(i.sprintf)(Object(i.__)("Error loading site %s"),t),error:!0}))})}),{siteOptions:u,handleChange:function(t){a({updated:Date.now()}),p(A()({},u,{option:t}))}}}var z=Object(d.compose)([Object(x.withSelect)(function(t,e){var n=e.clientId,r=t("core/editor"),o=r.isSavingPost,i=r.isPublishingPost,c=r.isAutosavingPost,a=r.isCurrentPostPublished,l=t("core/block-editor"),s=l.getBlockIndex,u=l.getBlockRootClientId,p=l.getTemplateLock,d=u(n);return{blockIndex:s(n,d),isLocked:!!p(d),rootClientId:d,shouldUpdateSiteOption:(o()&&a()||i())&&!c()}}),Object(x.withDispatch)(function(t,e){var n=e.blockIndex,r=e.rootClientId;return{createErrorNotice:t("core/notices").createErrorNotice,insertDefaultBlock:function(){return t("core/block-editor").insertDefaultBlock({},r,n+1)}}})])(function(t){var e=t.className,n=t.createErrorNotice,o=t.shouldUpdateSiteOption,c=t.isSelected,a=t.setAttributes,l=t.isLocked,s=t.insertDefaultBlock,u=q("description",Object(i.__)("Site description loading…"),n,c,o,a),p=u.siteOptions,d=u.handleChange,f=p.option;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(T.PlainText,{className:P()("site-description",e),value:f,onChange:function(t){return d(t)},onKeyDown:function(t){t.keyCode===D.ENTER&&(t.preventDefault(),l||s())},placeholder:Object(i.__)("Add a Site Description"),"aria-label":Object(i.__)("Site Description")}))});n(36);Object(o.registerBlockType)("a8c/site-description",{title:Object(i.__)("Site Description"),description:Object(i.__)("Site description, also known as the tagline."),icon:Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24"},Object(r.createElement)("path",{fill:"none",d:"M0 0h24v24H0z"}),Object(r.createElement)("path",{d:"M4 9h16v2H4V9zm0 4h10v2H4v-2z"})),category:"layout",supports:{align:["wide","full"],html:!1,multiple:!1,reusable:!1},attributes:{align:{type:"string",default:"wide"}},edit:z,save:function(){return null}});var V=Object(d.compose)([Object(x.withSelect)(function(t,e){var n=e.clientId,r=t("core/editor"),o=r.isSavingPost,i=r.isPublishingPost,c=r.isAutosavingPost,a=r.isCurrentPostPublished,l=t("core/block-editor"),s=l.getBlockIndex,u=l.getBlockRootClientId,p=l.getTemplateLock,d=u(n);return{blockIndex:s(n,d),isLocked:!!p(d),rootClientId:d,shouldUpdateSiteOption:(o()&&a()||i())&&!c()}}),Object(x.withDispatch)(function(t,e){var n=e.blockIndex,r=e.rootClientId;return{createErrorNotice:t("core/notices").createErrorNotice,insertDefaultBlock:function(){return t("core/block-editor").insertDefaultBlock({},r,n+1)}}})])(function(t){var e=t.className,n=t.createErrorNotice,o=t.shouldUpdateSiteOption,c=t.isSelected,a=t.setAttributes,l=t.isLocked,s=t.insertDefaultBlock,u=q("title",Object(i.__)("Site title loading…"),n,c,o,a),p=u.siteOptions,d=u.handleChange,f=p.option;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(T.PlainText,{className:P()("site-title",e),value:f,onChange:function(t){return d(t)},onKeyDown:function(t){t.keyCode===D.ENTER&&(t.preventDefault(),l||s())},placeholder:Object(i.__)("Add a Site Title"),"aria-label":Object(i.__)("Site Title")}))});n(37);Object(o.registerBlockType)("a8c/site-title",{title:Object(i.__)("Site Title"),description:Object(i.__)("Your site title."),icon:"layout",category:"layout",supports:{align:["wide","full"],html:!1,multiple:!1,reusable:!1},attributes:{align:{type:"string",default:"wide"}},edit:V,save:function(){return null}});var G=n(7),W=n(11),K=n(25),Q=(n(18),Object(d.compose)(Object(d.withState)({templateClientId:null}),Object(x.withSelect)(function(t,e){var n=e.attributes,r=e.templateClientId,o=t("core").getEntityRecord,i=t("core/editor"),c=i.getCurrentPostId,a=i.isEditedPostDirty,l=t("core/block-editor"),s=l.getBlock,u=l.getSelectedBlock,p=t("core/edit-post").isEditorSidebarOpened,d=n.templateId,f=c(),b=d&&o("postType","wp_template_part",d),m=Object(K.addQueryArgs)(fullSiteEditing.editTemplateBaseUrl,{post:d,fse_parent_post:f}),O=u();return{currentPostId:f,editTemplateUrl:m,template:b,templateBlock:s(r),templateTitle:Object(G.get)(b,["title","rendered"],""),isDirty:a(),isEditorSidebarOpened:!!p(),isAnyTemplateBlockSelected:O&&"a8c/template"===O.name}}),Object(x.withDispatch)(function(t,e){var n=t("core/block-editor").receiveBlocks,r=t("core/edit-post").openGeneralSidebar,i=e.template,c=e.templateClientId,a=e.setState;return{savePost:t("core/editor").savePost,receiveTemplateBlocks:function(){if(i&&!c){var t=Object(o.parse)(Object(G.get)(i,["content","raw"],"")),e=Object(o.createBlock)("core/group",{},t);n([e]),a({templateClientId:e.clientId})}},openGeneralSidebar:r}}))(function(t){var e,n=t.attributes,o=t.editTemplateUrl,c=t.receiveTemplateBlocks,a=t.template,l=t.templateBlock,s=t.templateTitle,u=t.isDirty,p=t.savePost,d=t.isEditorSidebarOpened,f=t.openGeneralSidebar,b=t.isAnyTemplateBlockSelected;if(!a)return Object(r.createElement)(W.Placeholder,null,Object(r.createElement)(W.Spinner,null));var O=Object(r.createRef)(),g=Object(r.useState)(!1),y=F()(g,2),v=y[0],h=y[1];Object(r.useEffect)(function(){v&&!u&&O.current.click(),c()}),Object(r.useEffect)(function(){var t=document.querySelector(".edit-post-sidebar__panel-tabs ul li:last-child");if(d&&t){if(b)return f("edit-post/document"),void t.classList.add("hidden");t.classList.remove("hidden")}},[b,d,f]);var j=n.align,E=n.className;return Object(r.createElement)("div",{className:P()("template-block",(e={},m()(e,"align".concat(j),j),m()(e,"is-navigating-to-template",v),e))},l&&Object(r.createElement)(r.Fragment,null,Object(r.createElement)(W.Disabled,null,Object(r.createElement)("div",{className:E},Object(r.createElement)(T.BlockEdit,{attributes:l.attributes,block:l,clientId:l.clientId,isSelected:!1,name:l.name,setAttributes:G.noop}))),Object(r.createElement)(W.Placeholder,{className:"template-block__overlay"},v&&Object(r.createElement)("div",{className:"template-block__loading"},Object(r.createElement)(W.Spinner,null)," ",Object(i.sprintf)(Object(i.__)("Loading %s Editor"),s)),Object(r.createElement)(W.Button,{className:v?"hidden":null,href:o,onClick:function(t){h(!0),u&&(t.preventDefault(),p())},isDefault:!0,isLarge:!0,ref:O},Object(i.sprintf)(Object(i.__)("Edit %s"),s)))))})),Y=Object(d.createHigherOrderComponent)(function(t){return function(e){return"fse-site-logo"!==e.attributes.className?Object(r.createElement)(t,e):Object(r.createElement)(t,p()({},e,{className:"template__site-logo"}))}},"addFSESiteLogoClassname");Object(f.addFilter)("editor.BlockListBlock","full-site-editing/blocks/template",Y),"wp_template_part"!==fullSiteEditing.editorPostType&&Object(o.registerBlockType)("a8c/template",{title:Object(i.__)("Template Part"),description:Object(i.__)("Display a Template Part."),icon:"layout",category:"layout",attributes:{templateId:{type:"number"},className:{type:"string"}},supports:{anchor:!1,customClassName:!1,html:!1,inserter:!1,reusable:!1},edit:Q,save:function(){return null},getEditWrapperProps:function(){return{"data-align":"full"}}});var J=Object(d.createHigherOrderComponent)(function(t){return function(e){return"a8c/template"!==e.name?Object(r.createElement)(t,e):Object(r.createElement)(t,p()({},e,{className:"template__block-container"}))}},"addFSETemplateClassname");Object(f.addFilter)("editor.BlockListBlock","full-site-editing/blocks/template",J,9);var X=n(13),Z=n.n(X);Z()(function(){var t=fullSiteEditing,e=t.closeButtonLabel,n=t.closeButtonUrl,r=t.editorPostType,o=setInterval(function(){var t=document.querySelector(".edit-post-fullscreen-mode-close__toolbar a");if(t&&(clearInterval(o),"wp_template_part"===r&&n)){var i=document.createElement("a");i.href=n,i.innerHTML=e,i.className="components-button components-icon-button is-button is-default",i.setAttribute("aria-label",e),document.querySelector(".edit-post-fullscreen-mode-close__toolbar").replaceChild(i,t)}})});var $=n(26),tt=n.n($),et=n(27),nt=Object(x.withSelect)(function(t){var e=t("core").getEntityRecord,n=t("core/editor").getEditedPostAttribute;return{templateClasses:Object(G.map)(n("template_part_types"),function(t){var n=Object(G.get)(e("taxonomy","wp_template_part_type",t),"name","");return Object(G.endsWith)(n,"-header")?"site-header site-branding":Object(G.endsWith)(n,"-footer")?"site-footer":void 0})}})(function(t){var e=t.templateClasses,n=setInterval(function(){var t=document.querySelector(".block-editor-writing-flow.editor-writing-flow > div");t&&(clearInterval(n),t.className=P.a.apply(void 0,["a8c-template-editor"].concat(tt()(e))))});return null});"wp_template_part"===fullSiteEditing.editorPostType&&Object(et.registerPlugin)("fse-editor-template-classes",{render:nt}),Z()(function(){"wp_template_part"===fullSiteEditing.editorPostType&&Object(x.dispatch)("core/notices").createNotice("info",Object(i.__)("Updates to this template will affect all pages on your site."),{isDismissible:!1})});var rt=Object(d.compose)(Object(x.withSelect)(function(t){var e=t("core/editor"),n=e.getBlocks,r=e.getEditorSettings,o=t("core/edit-post").getEditorMode,i=n().find(function(t){return"a8c/post-content"===t.name});return{rootClientId:i?i.clientId:"",showInserter:"visual"===o()&&r().richEditingEnabled}}))(function(t){var e=t.rootClientId,n=t.showInserter;return Object(r.createElement)(T.Inserter,{rootClientId:e,disabled:!n,position:"bottom right"})});Z()(function(){return function(){if("page"===fullSiteEditing.editorPostType)var t=setInterval(function(){var e=document.querySelector(".edit-post-header-toolbar");if(e){clearInterval(t);var n=document.createElement("div");n.classList.add("fse-post-content-block-inserter"),e.insertBefore(n,e.firstChild),Object(r.render)(Object(r.createElement)(rt,null),n)}})}()});var ot=Object(x.subscribe)(function(){if("page"!==fullSiteEditing.editorPostType)return ot();!1===Object(x.select)("core/editor").isValidTemplate()&&Object(x.dispatch)("core/editor").setTemplateValidity(!0)}),it=["logo","brand","emblem","hallmark"];Object(f.addFilter)("blocks.registerBlockType","full-site-editing/editor/image-block-keywords",function(t,e){return"core/image"!==e?t:t=Object(G.assign)({},t,{keywords:t.keywords.concat(it)})});n(41);Object(x.use)(function(t){return{dispatch:function(e){var n=A()({},t.dispatch(e)),r=fullSiteEditing.editorPostType;return"core/editor"===e&&n.trashPost&&"wp_template_part"===r&&(n.trashPost=function(){}),n}}}),Object(x.use)(function(t){return{dispatch:function(e){var n=A()({},t.dispatch(e)),r=fullSiteEditing.editorPostType;if("core/editor"===e&&n.editPost&&"wp_template_part"===r){var o=n.editPost;n.editPost=function(t){"draft"!==t.status&&o(t)}}return n}}});var ct=Object(x.subscribe)(function(){var t=Object(x.dispatch)("core/edit-post").removeEditorPanel;return"page"===fullSiteEditing.editorPostType&&t("featured-image"),"wp_template_part"===fullSiteEditing.editorPostType&&t("post-status"),ct()})}]));
1
+ !function(t,e){for(var n in e)t[n]=e[n]}(window,function(t){var e={};function n(o){if(e[o])return e[o].exports;var r=e[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(o,r,function(e){return t[e]}.bind(null,r));return o},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=42)}([function(t,e){!function(){t.exports=this.wp.element}()},function(t,e){!function(){t.exports=this.wp.i18n}()},function(t,e){!function(){t.exports=this.wp.data}()},function(t,e){!function(){t.exports=this.wp.blockEditor}()},function(t,e){!function(){t.exports=this.wp.compose}()},function(t,e){t.exports=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}},function(t,e){!function(){t.exports=this.lodash}()},function(t,e){!function(){t.exports=this.wp.blocks}()},function(t,e){!function(){t.exports=this.wp.components}()},function(t,e,n){var o=n(5);function r(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,o)}return n}t.exports=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?r(n,!0).forEach(function(e){o(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):r(n).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}},function(t,e){function n(){return t.exports=n=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},n.apply(this,arguments)}t.exports=n},function(t,e,n){var o;
2
  /*!
3
  Copyright (c) 2017 Jed Watson.
4
  Licensed under the MIT License (MIT), see
9
  Licensed under the MIT License (MIT), see
10
  http://jedwatson.github.io/classnames
11
  */
12
+ !function(){"use strict";var n={}.hasOwnProperty;function r(){for(var t=[],e=0;e<arguments.length;e++){var o=arguments[e];if(o){var i=typeof o;if("string"===i||"number"===i)t.push(o);else if(Array.isArray(o)&&o.length){var c=r.apply(null,o);c&&t.push(c)}else if("object"===i)for(var l in o)n.call(o,l)&&o[l]&&t.push(l)}}return t.join(" ")}t.exports?(r.default=r,t.exports=r):void 0===(o=function(){return r}.apply(e,[]))||(t.exports=o)}()},function(t,e){!function(){t.exports=this.wp.editor}()},function(t,e){!function(){t.exports=this.wp.hooks}()},function(t,e){!function(){t.exports=this.wp.domReady}()},function(t,e,n){var o=n(33),r=n(34),i=n(35);t.exports=function(t,e){return o(t)||r(t,e)||i()}},function(t,e){!function(){t.exports=this.wp.apiFetch}()},function(t,e){!function(){t.exports=this.wp.htmlEntities}()},function(t,e,n){},function(t,e){!function(){t.exports=this.wp.serverSideRender}()},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e){function n(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}t.exports=function(t,e,o){return e&&n(t.prototype,e),o&&n(t,o),t}},function(t,e,n){var o=n(29),r=n(30);t.exports=function(t,e){return!e||"object"!==o(e)&&"function"!=typeof e?r(t):e}},function(t,e){function n(e){return t.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},n(e)}t.exports=n},function(t,e,n){var o=n(31);t.exports=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&o(t,e)}},function(t,e){!function(){t.exports=this.wp.url}()},function(t,e,n){var o=n(38),r=n(39),i=n(40);t.exports=function(t){return o(t)||r(t)||i()}},function(t,e){!function(){t.exports=this.wp.plugins}()},function(t,e,n){},function(t,e){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(e){return"function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?t.exports=o=function(t){return n(t)}:t.exports=o=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":n(t)},o(e)}t.exports=o},function(t,e){t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}},function(t,e){function n(e,o){return t.exports=n=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},n(e,o)}t.exports=n},function(t,e,n){},function(t,e){t.exports=function(t){if(Array.isArray(t))return t}},function(t,e){t.exports=function(t,e){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t)){var n=[],o=!0,r=!1,i=void 0;try{for(var c,l=t[Symbol.iterator]();!(o=(c=l.next()).done)&&(n.push(c.value),!e||n.length!==e);o=!0);}catch(a){r=!0,i=a}finally{try{o||null==l.return||l.return()}finally{if(r)throw i}}return n}}},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}},function(t,e,n){},function(t,e,n){},function(t,e){t.exports=function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}},function(t,e){t.exports=function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}},function(t,e,n){},function(t,e,n){"use strict";n.r(e);var o=n(0),r=n(7),i=n(1),c=n(10),l=n.n(c),a=n(19),s=n.n(a),u=n(4),p=n(3),d=n(8),f=Object(u.compose)([Object(p.withColors)("backgroundColor",{textColor:"color"}),Object(p.withFontSizes)("fontSize")])(function(t){var e=t.attributes,n=t.backgroundColor,r=t.fontSize,c=t.setAttributes,a=t.setBackgroundColor,u=t.setFontSize,f=t.setTextColor,b=t.textColor,m=e.textAlign;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(p.BlockControls,null,Object(o.createElement)(p.AlignmentToolbar,{value:m,onChange:function(t){c({textAlign:t})}})),Object(o.createElement)(p.InspectorControls,null,Object(o.createElement)(d.PanelBody,{className:"blocks-font-size",title:Object(i.__)("Text Settings")},Object(o.createElement)(p.FontSizePicker,{onChange:u,value:r.size})),Object(o.createElement)(p.PanelColorSettings,{title:Object(i.__)("Color Settings"),initialOpen:!1,colorSettings:[{value:n.color,onChange:a,label:Object(i.__)("Background Color")},{value:b.color,onChange:f,label:Object(i.__)("Text Color")}]},Object(o.createElement)(p.ContrastChecker,l()({textColor:b.color,backgroundColor:n.color},{fontSize:r.size})))),Object(o.createElement)(s.a,{block:"a8c/navigation-menu",attributes:e}))}),b=(n(28),Object(o.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(o.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(o.createElement)("path",{d:"M12 7.27l4.28 10.43-3.47-1.53-.81-.36-.81.36-3.47 1.53L12 7.27M12 2L4.5 20.29l.71.71L12 18l6.79 3 .71-.71L12 2z"})));Object(r.registerBlockType)("a8c/navigation-menu",{title:Object(i.__)("Navigation Menu"),description:Object(i.__)("Visual placeholder for site-wide navigation and menus."),icon:b,category:"layout",supports:{align:["wide","full"],html:!1,reusable:!1},edit:f,save:function(){return null}});var m=n(13),g=n(5),O=n.n(g),j=n(20),h=n.n(j),v=n(21),y=n.n(v),S=n(22),_=n.n(S),E=n(23),k=n.n(E),w=n(24),C=n.n(w),x=n(11),P=n.n(x),T=n(2),B=n(12),I=function(t){function e(){return h()(this,e),_()(this,k()(e).apply(this,arguments))}return C()(e,t),y()(e,[{key:"toggleEditing",value:function(){var t=this.props,e=t.isEditing;(0,t.setState)({isEditing:!e})}},{key:"onSelectPost",value:function(t){var e=t.id,n=t.type;this.props.setState({isEditing:!1,selectedPostId:e,selectedPostType:n})}},{key:"render",value:function(){var t=this.props.attributes.align;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)("div",{className:P()("post-content-block",O()({},"align".concat(t),t))},Object(o.createElement)(B.PostTitle,null),Object(o.createElement)(B.InnerBlocks,{templateLock:!1})))}}]),e}(o.Component),z=Object(u.compose)([Object(u.withState)({isEditing:!1,selectedPostId:void 0,selectedPostType:void 0}),Object(T.withSelect)(function(t,e){var n=e.selectedPostId,o=e.selectedPostType;return{selectedPost:(0,t("core").getEntityRecord)("postType",o,n)}})])(I);n(32);Object(r.registerBlockType)("a8c/post-content",{title:Object(i.__)("Content"),description:Object(i.__)("The page content."),icon:"layout",category:"layout",supports:{align:["full"],anchor:!1,customClassName:!1,html:!1,inserter:!1,multiple:!1,reusable:!1},attributes:{align:{type:"string",default:"full"}},edit:z,save:function(){return Object(o.createElement)(B.InnerBlocks.Content,null)}});var A=Object(u.createHigherOrderComponent)(function(t){return function(e){return"a8c/post-content"!==e.name?Object(o.createElement)(t,e):Object(o.createElement)(t,l()({},e,{className:"post-content__block"}))}},"addContentSlotClassname");Object(m.addFilter)("editor.BlockListBlock","full-site-editing/blocks/post-content",A,9);var N=n(6),D=n(9),F=n.n(D),L=n(15),R=n.n(L),M=n(16),U=n.n(M),H=n(17);function q(t){var e=Object(o.useRef)();return Object(o.useEffect)(function(){e.current=t},[t]),e.current}function V(t,e,n,r,c,l){var a=Object(o.useState)({option:e,previousOption:"",loaded:!1,error:!1}),s=R()(a,2),u=s[0],p=s[1],d=q(r),f=q(c);function b(){p(F()({},u,{option:u.previousOption,isSaving:!1}))}return Object(o.useEffect)(function(){u.loaded||u.error?function(){var e=u.option,o=u.previousOption,l=e&&e.trim()===o.trim(),a=!e||0===e.trim().length;!r&&d&&a&&b();if(!c||l)return;!f&&c&&function(e){p(F()({},u,{isSaving:!0})),U()({path:"/wp/v2/settings",method:"POST",data:O()({},t,e)}).then(function(){return function(t){p(F()({},u,{previousOption:t,isDirty:!1,isSaving:!1}))}(e)}).catch(function(){n(Object(i.sprintf)(Object(i.__)("Unable to save site %s"),t)),b()})}(e)}():U()({path:"/wp/v2/settings"}).then(function(e){return p(F()({},u,{option:Object(H.decodeEntities)(e[t]),previousOption:Object(H.decodeEntities)(e[t]),loaded:!0,error:!1}))}).catch(function(){n(Object(i.sprintf)(Object(i.__)("Unable to load site %s"),t)),p(F()({},u,{option:Object(i.sprintf)(Object(i.__)("Error loading site %s"),t),error:!0}))})}),{siteOptions:u,handleChange:function(t){l({updated:Date.now()}),p(F()({},u,{option:t}))}}}var G=Object(u.compose)([Object(p.withColors)("backgroundColor",{textColor:"color"}),Object(p.withFontSizes)("fontSize"),Object(T.withSelect)(function(t,e){var n=e.clientId,o=t("core/editor"),r=o.isSavingPost,i=o.isPublishingPost,c=o.isAutosavingPost,l=o.isCurrentPostPublished,a=t("core/block-editor"),s=a.getBlockIndex,u=a.getBlockRootClientId,p=a.getTemplateLock,d=u(n);return{blockIndex:s(n,d),isLocked:!!p(d),rootClientId:d,shouldUpdateSiteOption:(r()&&l()||i())&&!c()}}),Object(T.withDispatch)(function(t,e){var n=e.blockIndex,o=e.rootClientId;return{createErrorNotice:t("core/notices").createErrorNotice,insertDefaultBlock:function(){return t("core/block-editor").insertDefaultBlock({},o,n+1)}}})])(function(t){var e,n=t.attributes,r=t.backgroundColor,c=t.className,a=t.createErrorNotice,s=t.fontSize,u=t.insertDefaultBlock,f=t.isSelected,b=t.setAttributes,m=t.setBackgroundColor,g=t.setFontSize,j=t.setTextColor,h=t.shouldUpdateSiteOption,v=t.textColor,y=n.textAlign,S=V("description",Object(i.__)("Site description loading…"),a,f,h,b),_=S.siteOptions,E=S.handleChange,k=_.option;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(p.BlockControls,null,Object(o.createElement)(p.AlignmentToolbar,{value:y,onChange:function(t){b({textAlign:t})}})),Object(o.createElement)(p.InspectorControls,null,Object(o.createElement)(d.PanelBody,{className:"blocks-font-size",title:Object(i.__)("Text Settings")},Object(o.createElement)(p.FontSizePicker,{onChange:g,value:s.size})),Object(o.createElement)(p.PanelColorSettings,{title:Object(i.__)("Color Settings"),initialOpen:!1,colorSettings:[{value:r.color,onChange:m,label:Object(i.__)("Background Color")},{value:v.color,onChange:j,label:Object(i.__)("Text Color")}]},Object(o.createElement)(p.ContrastChecker,l()({textColor:v.color,backgroundColor:r.color},{fontSize:s.size})))),Object(o.createElement)(p.RichText,{allowedFormats:[],"aria-label":Object(i.__)("Site Description"),className:P()("site-description",c,(e={"has-text-color":v.color,"has-background":r.color},O()(e,"has-text-align-".concat(y),y),O()(e,r.class,r.class),O()(e,v.class,v.class),O()(e,s.class,s.class),e)),identifier:"content",onChange:function(t){return E(t)},onReplace:u,onSplit:N.noop,placeholder:Object(i.__)("Add a Site Description"),style:{backgroundColor:r.color,color:v.color,fontSize:s.size?s.size+"px":void 0},tagName:"p",value:k}))});n(36);Object(r.registerBlockType)("a8c/site-description",{title:Object(i.__)("Site Description"),description:Object(i.__)("Site description, also known as the tagline."),icon:Object(o.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24"},Object(o.createElement)("path",{fill:"none",d:"M0 0h24v24H0z"}),Object(o.createElement)("path",{d:"M4 9h16v2H4V9zm0 4h10v2H4v-2z"})),category:"layout",supports:{align:["wide","full"],html:!1,multiple:!1,reusable:!1},attributes:{align:{type:"string",default:"wide"},textAlign:{type:"string",default:"center"},textColor:{type:"string"},customTextColor:{type:"string"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},fontSize:{type:"string",default:"small"},customFontSize:{type:"number"}},edit:G,save:function(){return null}});var W=Object(u.compose)([Object(p.withColors)({textColor:"color"}),Object(p.withFontSizes)("fontSize"),Object(T.withSelect)(function(t,e){var n=e.clientId,o=t("core/editor"),r=o.isSavingPost,i=o.isPublishingPost,c=o.isAutosavingPost,l=o.isCurrentPostPublished,a=t("core/block-editor"),s=a.getBlockIndex,u=a.getBlockRootClientId,p=a.getTemplateLock,d=u(n);return{blockIndex:s(n,d),isLocked:!!p(d),rootClientId:d,shouldUpdateSiteOption:(r()&&l()||i())&&!c()}}),Object(T.withDispatch)(function(t,e){var n=e.blockIndex,o=e.rootClientId;return{createErrorNotice:t("core/notices").createErrorNotice,insertDefaultBlock:function(){return t("core/block-editor").insertDefaultBlock({},o,n+1)}}})])(function(t){var e,n=t.attributes,r=t.className,c=t.createErrorNotice,l=t.fontSize,a=t.insertDefaultBlock,s=t.isSelected,u=t.setAttributes,f=t.setFontSize,b=t.setTextColor,m=t.shouldUpdateSiteOption,g=t.textColor,j=n.textAlign,h=V("title",Object(i.__)("Site title loading…"),c,s,m,u),v=h.siteOptions,y=h.handleChange,S=v.option;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(p.BlockControls,null,Object(o.createElement)(p.AlignmentToolbar,{value:j,onChange:function(t){u({textAlign:t})}})),Object(o.createElement)(p.InspectorControls,null,Object(o.createElement)(d.PanelBody,{className:"blocks-font-size",title:Object(i.__)("Text Settings")},Object(o.createElement)(p.FontSizePicker,{onChange:f,value:l.size})),Object(o.createElement)(p.PanelColorSettings,{title:Object(i.__)("Color Settings"),initialOpen:!1,colorSettings:[{value:g.color,onChange:b,label:Object(i.__)("Text Color")}]})),Object(o.createElement)(p.RichText,{allowedFormats:[],"aria-label":Object(i.__)("Site Title"),className:P()("site-title",r,(e={"has-text-color":g.color},O()(e,"has-text-align-".concat(j),j),O()(e,g.class,g.class),O()(e,l.class,l.class),e)),identifier:"content",onChange:function(t){return y(t)},onReplace:a,onSplit:N.noop,placeholder:Object(i.__)("Add a Site Title"),style:{color:g.color,fontSize:l.size?l.size+"px":void 0},tagName:"h1",value:S}))});n(37);Object(r.registerBlockType)("a8c/site-title",{title:Object(i.__)("Site Title"),description:Object(i.__)("Your site title."),icon:"layout",category:"layout",supports:{align:["wide","full"],html:!1,multiple:!1,reusable:!1},attributes:{align:{type:"string",default:"wide"},textAlign:{type:"string",default:"center"},textColor:{type:"string"},customTextColor:{type:"string"},fontSize:{type:"string",default:"normal"},customFontSize:{type:"number"}},edit:W,save:function(){return null}});var Q=n(25),Y=(n(18),Object(u.compose)(Object(u.withState)({templateClientId:null}),Object(T.withSelect)(function(t,e){var n=e.attributes,o=e.templateClientId,r=t("core").getEntityRecord,i=t("core/editor"),c=i.getCurrentPostId,l=i.isEditedPostDirty,a=t("core/block-editor"),s=a.getBlock,u=a.getSelectedBlock,p=t("core/edit-post").isEditorSidebarOpened,d=n.templateId,f=c(),b=d&&r("postType","wp_template_part",d),m=Object(Q.addQueryArgs)(fullSiteEditing.editTemplateBaseUrl,{post:d,fse_parent_post:f}),g=u();return{currentPostId:f,editTemplateUrl:m,template:b,templateBlock:s(o),templateTitle:Object(N.get)(b,["title","rendered"],""),isDirty:l(),isEditorSidebarOpened:!!p(),isAnyTemplateBlockSelected:g&&"a8c/template"===g.name}}),Object(T.withDispatch)(function(t,e){var n=t("core/block-editor").receiveBlocks,o=t("core/edit-post").openGeneralSidebar,i=e.template,c=e.templateClientId,l=e.setState;return{savePost:t("core/editor").savePost,receiveTemplateBlocks:function(){if(i&&!c){var t=Object(r.parse)(Object(N.get)(i,["content","raw"],"")),e=Object(r.createBlock)("core/group",{},t);n([e]),l({templateClientId:e.clientId})}},openGeneralSidebar:o}}))(function(t){var e,n=t.attributes,r=t.editTemplateUrl,c=t.receiveTemplateBlocks,l=t.template,a=t.templateBlock,s=t.templateTitle,u=t.isDirty,p=t.savePost,f=t.isEditorSidebarOpened,b=t.openGeneralSidebar,m=t.isAnyTemplateBlockSelected;if(!l)return Object(o.createElement)(d.Placeholder,null,Object(o.createElement)(d.Spinner,null));var g=Object(o.createRef)(),j=Object(o.useState)(!1),h=R()(j,2),v=h[0],y=h[1];Object(o.useEffect)(function(){v&&!u&&g.current.click(),c()}),Object(o.useEffect)(function(){var t=document.querySelector(".edit-post-sidebar__panel-tabs ul li:last-child");if(f&&t){if(m)return b("edit-post/document"),void t.classList.add("hidden");t.classList.remove("hidden")}},[m,f,b]);var S=n.align,_=n.className;return Object(o.createElement)("div",{className:P()("template-block",(e={},O()(e,"align".concat(S),S),O()(e,"is-navigating-to-template",v),e))},a&&Object(o.createElement)(o.Fragment,null,Object(o.createElement)(d.Disabled,null,Object(o.createElement)("div",{className:_},Object(o.createElement)(B.BlockEdit,{attributes:a.attributes,block:a,clientId:a.clientId,isSelected:!1,name:a.name,setAttributes:N.noop}))),Object(o.createElement)(d.Placeholder,{className:"template-block__overlay"},v&&Object(o.createElement)("div",{className:"template-block__loading"},Object(o.createElement)(d.Spinner,null)," ",Object(i.sprintf)(Object(i.__)("Loading %s Editor"),s)),Object(o.createElement)(d.Button,{className:v?"hidden":null,href:r,onClick:function(t){y(!0),u&&(t.preventDefault(),p())},isDefault:!0,isLarge:!0,ref:g},Object(i.sprintf)(Object(i.__)("Edit %s"),s)))))})),J=Object(u.createHigherOrderComponent)(function(t){return function(e){return"fse-site-logo"!==e.attributes.className?Object(o.createElement)(t,e):Object(o.createElement)(t,l()({},e,{className:"template__site-logo"}))}},"addFSESiteLogoClassname");Object(m.addFilter)("editor.BlockListBlock","full-site-editing/blocks/template",J),"wp_template_part"!==fullSiteEditing.editorPostType&&Object(r.registerBlockType)("a8c/template",{title:Object(i.__)("Template Part"),description:Object(i.__)("Display a Template Part."),icon:"layout",category:"layout",attributes:{templateId:{type:"number"},className:{type:"string"}},supports:{anchor:!1,customClassName:!1,html:!1,inserter:!1,reusable:!1},edit:Y,save:function(){return null},getEditWrapperProps:function(){return{"data-align":"full"}}});var K=Object(u.createHigherOrderComponent)(function(t){return function(e){return"a8c/template"!==e.name?Object(o.createElement)(t,e):Object(o.createElement)(t,l()({},e,{className:"template__block-container"}))}},"addFSETemplateClassname");Object(m.addFilter)("editor.BlockListBlock","full-site-editing/blocks/template",K,9);var X=n(14),Z=n.n(X);Z()(function(){var t=fullSiteEditing,e=t.closeButtonLabel,n=t.closeButtonUrl,o=t.editorPostType,r=setInterval(function(){var t=document.querySelector(".edit-post-fullscreen-mode-close__toolbar a");if(t&&(clearInterval(r),"wp_template_part"===o&&n)){var i=document.createElement("a");i.href=n,i.innerHTML=e,i.className="components-button components-icon-button is-button is-default",i.setAttribute("aria-label",e),document.querySelector(".edit-post-fullscreen-mode-close__toolbar").replaceChild(i,t)}})});var $=n(26),tt=n.n($),et=n(27),nt=Object(T.withSelect)(function(t){var e=t("core").getEntityRecord,n=t("core/editor").getEditedPostAttribute;return{templateClasses:Object(N.map)(n("template_part_types"),function(t){var n=Object(N.get)(e("taxonomy","wp_template_part_type",t),"name","");return Object(N.endsWith)(n,"-header")?"site-header site-branding":Object(N.endsWith)(n,"-footer")?"site-footer":void 0})}})(function(t){var e=t.templateClasses,n=setInterval(function(){var t=document.querySelector(".block-editor-writing-flow.editor-writing-flow > div");t&&(clearInterval(n),t.className=P.a.apply(void 0,["a8c-template-editor"].concat(tt()(e))))});return null});"wp_template_part"===fullSiteEditing.editorPostType&&Object(et.registerPlugin)("fse-editor-template-classes",{render:nt}),Z()(function(){"wp_template_part"===fullSiteEditing.editorPostType&&Object(T.dispatch)("core/notices").createNotice("info",Object(i.__)("Updates to this template will affect all pages on your site."),{isDismissible:!1})});var ot=Object(u.compose)(Object(T.withSelect)(function(t){var e=t("core/editor"),n=e.getBlocks,o=e.getEditorSettings,r=t("core/edit-post").getEditorMode,i=n().find(function(t){return"a8c/post-content"===t.name});return{rootClientId:i?i.clientId:"",showInserter:"visual"===r()&&o().richEditingEnabled}}))(function(t){var e=t.rootClientId,n=t.showInserter;return Object(o.createElement)(B.Inserter,{rootClientId:e,disabled:!n,position:"bottom right"})});Z()(function(){return function(){if("page"===fullSiteEditing.editorPostType)var t=setInterval(function(){var e=document.querySelector(".edit-post-header-toolbar");if(e){clearInterval(t);var n=document.createElement("div");n.classList.add("fse-post-content-block-inserter"),e.insertBefore(n,e.firstChild),Object(o.render)(Object(o.createElement)(ot,null),n)}})}()});var rt=Object(T.subscribe)(function(){if("page"!==fullSiteEditing.editorPostType)return rt();!1===Object(T.select)("core/editor").isValidTemplate()&&Object(T.dispatch)("core/editor").setTemplateValidity(!0)}),it=["logo","brand","emblem","hallmark"];Object(m.addFilter)("blocks.registerBlockType","full-site-editing/editor/image-block-keywords",function(t,e){return"core/image"!==e?t:t=Object(N.assign)({},t,{keywords:t.keywords.concat(it)})});n(41);Object(T.use)(function(t){return{dispatch:function(e){var n=F()({},t.dispatch(e)),o=fullSiteEditing.editorPostType;return"core/editor"===e&&n.trashPost&&"wp_template_part"===o&&(n.trashPost=function(){}),n}}}),Object(T.use)(function(t){return{dispatch:function(e){var n=F()({},t.dispatch(e)),o=fullSiteEditing.editorPostType;if("core/editor"===e&&n.editPost&&"wp_template_part"===o){var r=n.editPost;n.editPost=function(t){"draft"!==t.status&&r(t)}}return n}}});var ct=Object(T.subscribe)(function(){var t=Object(T.dispatch)("core/edit-post").removeEditorPanel;return"page"===fullSiteEditing.editorPostType&&t("featured-image"),"wp_template_part"===fullSiteEditing.editorPostType&&t("post-status"),ct()})}]));
full-site-editing/dist/full-site-editing.rtl.css CHANGED
@@ -1 +1 @@
1
- .wp-block-a8c-navigation-menu.main-navigation{pointer-events:none}.post-content-block.alignfull{padding:0 12px}@media (max-width:768px){.post-content-block.alignfull{overflow-x:hidden}}.post-content-block__selector{width:300px}.post-content-block__selector a{font-family:sans-serif;font-size:13px;padding-right:8px}.post-content-block__preview{pointer-events:none}.post-content-block__preview:after{content:"";clear:both;display:table}.post-content-block .editor-post-title,.show-post-title-before-content .editor-post-title{display:none}.show-post-title-before-content .post-content-block .editor-post-title{display:block}@media (max-width:768px){.post-content-block .block-editor-block-list__layout .block-editor-block-list__block[data-align=full]{max-width:768px;margin-right:0;margin-left:0}.post-content-block .block-editor-block-list__layout .block-editor-block-list__block[data-align=full] .block-editor-block-mover{right:60px}}@media (min-width:768px){.post-content-block .block-editor-block-list__layout .block-editor-block-list__block[data-align=full]{max-width:calc(100vw - 81px);margin-right:3px;margin-left:3px}}.block-editor-block-list__layout .post-content__block.is-selected .block-editor-block-contextual-toolbar{display:none}.block-editor-block-list__layout .post-content__block.block-editor-block-list__block.has-child-selected>.block-editor-block-list__block-edit:before,.block-editor-block-list__layout .post-content__block.block-editor-block-list__block.is-hovered>.block-editor-block-list__block-edit:before,.block-editor-block-list__layout .post-content__block.block-editor-block-list__block.is-navigate-mode>.block-editor-block-list__block-edit:before,.block-editor-block-list__layout .post-content__block.block-editor-block-list__block>.block-editor-block-list__block-edit:before{transition:none;border:none;outline:none;box-shadow:none}.block-editor-block-list__layout .post-content__block.block-editor-block-list__block.has-child-selected>.block-editor-block-list__block-edit>.block-editor-block-list__breadcrumb,.block-editor-block-list__layout .post-content__block.block-editor-block-list__block.is-hovered>.block-editor-block-list__block-edit>.block-editor-block-list__breadcrumb,.block-editor-block-list__layout .post-content__block.block-editor-block-list__block.is-navigate-mode>.block-editor-block-list__block-edit>.block-editor-block-list__breadcrumb,.block-editor-block-list__layout .post-content__block.block-editor-block-list__block>.block-editor-block-list__block-edit>.block-editor-block-list__breadcrumb{display:none}.block-editor .wp-block-a8c-site-description:focus{box-shadow:none;background-color:transparent}.block-editor .wp-block.is-selected .wp-block-a8c-site-description::-webkit-input-placeholder{color:transparent}.block-editor .wp-block.is-selected .wp-block-a8c-site-description:-moz-placeholder,.block-editor .wp-block.is-selected .wp-block-a8c-site-description::-moz-placeholder{color:transparent}.block-editor .wp-block.is-selected .wp-block-a8c-site-description:-ms-input-placeholder{color:transparent}.block-editor .wp-block-a8c-site-title:focus{box-shadow:none;background-color:transparent}.block-editor .wp-block.is-selected .wp-block-a8c-site-title::-webkit-input-placeholder{color:transparent}.block-editor .wp-block.is-selected .wp-block-a8c-site-title:-moz-placeholder,.block-editor .wp-block.is-selected .wp-block-a8c-site-title::-moz-placeholder{color:transparent}.block-editor .wp-block.is-selected .wp-block-a8c-site-title:-ms-input-placeholder{color:transparent}.template-block{min-height:200px;overflow:hidden;position:relative}.template__block-container.is-hovered{cursor:pointer}.template__block-container.is-hovered .components-disabled,.template__block-container .is-navigating-to-template .components-disabled,.template__block-container.is-selected .components-disabled{filter:blur(2px);transition:filter .2s linear .7s}.template__block-container.is-hovered .template-block__overlay,.template__block-container .is-navigating-to-template .template-block__overlay,.template__block-container.is-selected .template-block__overlay{opacity:1;transition:opacity .2s linear}.template__block-container.is-hovered .template-block__overlay .components-button,.template__block-container .is-navigating-to-template .template-block__overlay .components-button,.template__block-container.is-selected .template-block__overlay .components-button{opacity:1;transition:opacity .2s linear .7s}.template__block-container .components-disabled{filter:blur(0);transition:filter .2s linear 0s}.template__block-container .block-editor-block-contextual-toolbar,.template__block-container .block-editor-block-list__block-edit:before,.template__block-container .block-editor-block-list__block-mobile-toolbar,.template__block-container .block-editor-block-list__breadcrumb,.template__block-container .block-editor-block-list__insertion-point{display:none}.template-block__overlay{background:hsla(0,0%,100%,.8);border:0 solid rgba(123,134,162,.3);bottom:0;right:0;margin:0;opacity:0;padding:0;position:absolute;left:0;transition:opacity .2s linear 0s;top:0;z-index:2}.is-selected .template-block__overlay{border-color:rgba(66,88,99,.4)}.editor-block-list__block:first-child .template-block__overlay{border-bottom-width:1px}.editor-block-list__block:last-child .template-block__overlay{border-top-width:1px}@media only screen and (min-width:768px){.template-block__overlay{border-width:1px}}.template-block__overlay .components-button{opacity:0;transition:opacity .2s linear 0s}.template-block__overlay .components-button.hidden{display:none}.template-block__loading{display:flex;align-items:center;color:#191e23}.block-editor-page:not(.post-type-wp_template_part) .fse-site-logo .components-placeholder__fieldset,.block-editor-page:not(.post-type-wp_template_part) .fse-site-logo .components-placeholder__instructions,.post-type-wp_template_part .edit-post-post-status,.post-type-wp_template_part .editor-post-title,.post-type-wp_template_part .editor-post-trash{display:none}.post-type-wp_template_part .edit-post-visual-editor{margin-top:20px;padding-top:0}.post-type-wp_template_part .editor-post-switch-to-draft{display:none}@media (min-width:768px){.post-type-page .edit-post-layout__content,.post-type-wp_template_part .edit-post-layout__content{background:#eee}.post-type-page .edit-post-layout__content .edit-post-visual-editor,.post-type-wp_template_part .edit-post-layout__content .edit-post-visual-editor{box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.12),0 1px 5px 0 rgba(0,0,0,.2);flex:none;margin:36px 32px}}.post-type-page .editor-writing-flow__click-redirect,.post-type-wp_template_part .editor-writing-flow__click-redirect{display:none}.editor-styles-wrapper{background:#fff}.post-type-page .edit-post-visual-editor{padding-top:0}.post-type-page .block-editor-writing-flow{display:block}.post-type-page .wp-block.template__block-container [data-block]{margin:0}
1
+ .wp-block-a8c-navigation-menu.main-navigation{pointer-events:none}.post-content-block.alignfull{padding:0 12px}@media (max-width:768px){.post-content-block.alignfull{overflow-x:hidden}}.post-content-block__selector{width:300px}.post-content-block__selector a{font-family:sans-serif;font-size:13px;padding-right:8px}.post-content-block__preview{pointer-events:none}.post-content-block__preview:after{content:"";clear:both;display:table}.post-content-block .editor-post-title,.show-post-title-before-content .editor-post-title{display:none}.show-post-title-before-content .post-content-block .editor-post-title{display:block}@media (max-width:768px){.post-content-block .block-editor-block-list__layout .block-editor-block-list__block[data-align=full]{max-width:768px;margin-right:0;margin-left:0}.post-content-block .block-editor-block-list__layout .block-editor-block-list__block[data-align=full] .block-editor-block-mover{right:60px}}@media (min-width:768px){.post-content-block .block-editor-block-list__layout .block-editor-block-list__block[data-align=full]{max-width:calc(100vw - 81px);margin-right:3px;margin-left:3px}}.block-editor-block-list__layout .post-content__block.is-selected .block-editor-block-contextual-toolbar{display:none}.block-editor-block-list__layout .post-content__block.block-editor-block-list__block.has-child-selected>.block-editor-block-list__block-edit:before,.block-editor-block-list__layout .post-content__block.block-editor-block-list__block.is-hovered>.block-editor-block-list__block-edit:before,.block-editor-block-list__layout .post-content__block.block-editor-block-list__block.is-navigate-mode>.block-editor-block-list__block-edit:before,.block-editor-block-list__layout .post-content__block.block-editor-block-list__block>.block-editor-block-list__block-edit:before{transition:none;border:none;outline:none;box-shadow:none}.block-editor-block-list__layout .post-content__block.block-editor-block-list__block.has-child-selected>.block-editor-block-list__block-edit>.block-editor-block-list__breadcrumb,.block-editor-block-list__layout .post-content__block.block-editor-block-list__block.is-hovered>.block-editor-block-list__block-edit>.block-editor-block-list__breadcrumb,.block-editor-block-list__layout .post-content__block.block-editor-block-list__block.is-navigate-mode>.block-editor-block-list__block-edit>.block-editor-block-list__breadcrumb,.block-editor-block-list__layout .post-content__block.block-editor-block-list__block>.block-editor-block-list__block-edit>.block-editor-block-list__breadcrumb{display:none}.block-editor .wp-block-a8c-site-description:focus{box-shadow:none;background-color:transparent}.block-editor .wp-block.is-selected .wp-block-a8c-site-description::-webkit-input-placeholder{color:transparent}.block-editor .wp-block.is-selected .wp-block-a8c-site-description:-moz-placeholder,.block-editor .wp-block.is-selected .wp-block-a8c-site-description::-moz-placeholder{color:transparent}.block-editor .wp-block.is-selected .wp-block-a8c-site-description:-ms-input-placeholder{color:transparent}.block-editor .wp-block-a8c-site-title:focus{box-shadow:none;background-color:transparent}.block-editor .wp-block.is-selected .wp-block-a8c-site-title::-webkit-input-placeholder{color:transparent}.block-editor .wp-block.is-selected .wp-block-a8c-site-title:-moz-placeholder,.block-editor .wp-block.is-selected .wp-block-a8c-site-title::-moz-placeholder{color:transparent}.block-editor .wp-block.is-selected .wp-block-a8c-site-title:-ms-input-placeholder{color:transparent}.template-block{min-height:200px;overflow:hidden;position:relative}.template__block-container.is-hovered{cursor:pointer}.template__block-container.is-hovered .components-disabled,.template__block-container .is-navigating-to-template .components-disabled,.template__block-container.is-selected .components-disabled{filter:blur(2px);transition:filter .2s linear .7s}.template__block-container.is-hovered .template-block__overlay,.template__block-container .is-navigating-to-template .template-block__overlay,.template__block-container.is-selected .template-block__overlay{opacity:1;transition:opacity .2s linear}.template__block-container.is-hovered .template-block__overlay .components-button,.template__block-container .is-navigating-to-template .template-block__overlay .components-button,.template__block-container.is-selected .template-block__overlay .components-button{opacity:1;transition:opacity .2s linear .7s}.template__block-container .components-disabled{filter:blur(0);transition:filter .2s linear 0s}.template__block-container .block-editor-block-contextual-toolbar,.template__block-container .block-editor-block-list__block-edit:before,.template__block-container .block-editor-block-list__block-mobile-toolbar,.template__block-container .block-editor-block-list__breadcrumb,.template__block-container .block-editor-block-list__insertion-point{display:none}@media (min-width:600px){.template__block-container .block-editor-block-list__layout .block-editor-block-list__block[data-align=full]{margin-right:14px;margin-left:14px}}.template-block__overlay{background:hsla(0,0%,100%,.8);border:0 solid rgba(123,134,162,.3);bottom:0;right:0;margin:0;opacity:0;padding:0;position:absolute;left:0;transition:opacity .2s linear 0s;top:0;z-index:2}.is-selected .template-block__overlay{border-color:rgba(66,88,99,.4)}.editor-block-list__block:first-child .template-block__overlay{border-bottom-width:1px}.editor-block-list__block:last-child .template-block__overlay{border-top-width:1px}@media only screen and (min-width:768px){.template-block__overlay{border-width:1px}}.template-block__overlay .components-button{opacity:0;transition:opacity .2s linear 0s}.template-block__overlay .components-button.hidden{display:none}.template-block__loading{display:flex;align-items:center;color:#191e23}.block-editor-page:not(.post-type-wp_template_part) .fse-site-logo .components-placeholder__fieldset,.block-editor-page:not(.post-type-wp_template_part) .fse-site-logo .components-placeholder__instructions,.post-type-wp_template_part .edit-post-post-status,.post-type-wp_template_part .editor-post-title,.post-type-wp_template_part .editor-post-trash{display:none}.post-type-wp_template_part .edit-post-visual-editor{margin-top:20px;padding-top:0}.post-type-wp_template_part .editor-post-switch-to-draft{display:none}@media (min-width:768px){.post-type-page .edit-post-layout__content,.post-type-wp_template_part .edit-post-layout__content{background:#eee}.post-type-page .edit-post-layout__content .edit-post-visual-editor,.post-type-wp_template_part .edit-post-layout__content .edit-post-visual-editor{box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.12),0 1px 5px 0 rgba(0,0,0,.2);flex:none;margin:36px 32px}}.post-type-page .editor-writing-flow__click-redirect,.post-type-wp_template_part .editor-writing-flow__click-redirect{display:none}.editor-styles-wrapper{background:#fff}.post-type-page .edit-post-visual-editor{padding-top:0}.post-type-page .block-editor-writing-flow{display:block}.post-type-page .wp-block.template__block-container [data-block]{margin:0}
posts-list-block/blocks/posts-list/index.js CHANGED
@@ -1,11 +1,13 @@
 
1
  /**
2
  * WordPress dependencies
3
  */
4
- import { registerBlockType } from '@wordpress/blocks';
5
  import { __ } from '@wordpress/i18n';
6
  import { Placeholder, RangeControl, PanelBody } from '@wordpress/components';
7
  import { Fragment } from '@wordpress/element';
8
  import { InspectorControls } from '@wordpress/editor';
 
9
 
10
  /**
11
  * Internal dependencies
@@ -61,4 +63,22 @@ registerBlockType( metadata.name, {
61
  </Fragment>
62
  ),
63
  save: () => null,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
64
  } );
1
+ /* eslint-disable import/no-extraneous-dependencies */
2
  /**
3
  * WordPress dependencies
4
  */
5
+ import { registerBlockType, createBlock } from '@wordpress/blocks';
6
  import { __ } from '@wordpress/i18n';
7
  import { Placeholder, RangeControl, PanelBody } from '@wordpress/components';
8
  import { Fragment } from '@wordpress/element';
9
  import { InspectorControls } from '@wordpress/editor';
10
+ /* eslint-enable import/no-extraneous-dependencies */
11
 
12
  /**
13
  * Internal dependencies
63
  </Fragment>
64
  ),
65
  save: () => null,
66
+ transforms: {
67
+ to: [
68
+ {
69
+ type: 'block',
70
+ blocks: [ 'newspack-blocks/homepage-articles' ],
71
+ transform: ( { postsPerPage } ) => {
72
+ // Configure the Newspack block to look as close as possible
73
+ // to the output of this one.
74
+ return createBlock( 'newspack-blocks/homepage-articles', {
75
+ postsToShow: postsPerPage,
76
+ showAvatar: false,
77
+ displayPostDate: true,
78
+ displayPostContent: true,
79
+ } );
80
+ },
81
+ },
82
+ ],
83
+ },
84
  } );
posts-list-block/dist/posts-list-block.js CHANGED
@@ -1 +1 @@
1
- !function(e,t){for(var n in t)e[n]=t[n]}(window,function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=7)}([function(e,t){!function(){e.exports=this.wp.element}()},function(e,t){!function(){e.exports=this.wp.i18n}()},function(e,t){!function(){e.exports=this.wp.components}()},function(e){e.exports={b:"a8c/posts-list",a:{postsPerPage:{type:"number",default:10}}}},function(e,t){!function(){e.exports=this.wp.blocks}()},function(e,t){!function(){e.exports=this.wp.editor}()},function(e,t,n){},function(e,t,n){"use strict";n.r(t);var o=n(0),r=n(4),i=n(1),l=n(2),u=n(5),c=n(3),s=(n(6),Object(o.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(o.createElement)("path",{opacity:".87",fill:"none",d:"M0 0h24v24H0V0z"}),Object(o.createElement)("path",{d:"M3 5v14h17V5H3zm4 2v2H5V7h2zm-2 6v-2h2v2H5zm0 2h2v2H5v-2zm13 2H9v-2h9v2zm0-4H9v-2h9v2zm0-4H9V7h9v2z"})));Object(r.registerBlockType)(c.b,{title:Object(i.__)("Blog Posts Listing","full-site-editing"),description:Object(i.__)("Displays your latest Blog Posts.","full-site-editing"),icon:s,category:"layout",supports:{html:!1,multiple:!1,reusable:!1},attributes:c.a,edit:function(e){var t=e.attributes,n=e.setAttributes,r=e.isSelected;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(l.Placeholder,{icon:s,label:Object(i.__)("Your recent blog posts will be displayed here.","full-site-editing")},r?Object(o.createElement)(l.RangeControl,{label:Object(i.__)("Number of posts to show","full-site-editing"),value:t.postsPerPage,onChange:function(e){return n({postsPerPage:e})},min:1,max:50}):null),Object(o.createElement)(u.InspectorControls,null,Object(o.createElement)(l.PanelBody,null,Object(o.createElement)(l.RangeControl,{label:Object(i.__)("Number of posts","full-site-editing"),value:t.postsPerPage,onChange:function(e){return n({postsPerPage:e})},min:1,max:50}))))},save:function(){return null}})}]));
1
+ !function(e,t){for(var n in t)e[n]=t[n]}(window,function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=7)}([function(e,t){!function(){e.exports=this.wp.element}()},function(e,t){!function(){e.exports=this.wp.i18n}()},function(e,t){!function(){e.exports=this.wp.components}()},function(e,t){!function(){e.exports=this.wp.blocks}()},function(e){e.exports={b:"a8c/posts-list",a:{postsPerPage:{type:"number",default:10}}}},function(e,t){!function(){e.exports=this.wp.editor}()},function(e,t,n){},function(e,t,n){"use strict";n.r(t);var o=n(0),r=n(3),l=n(1),i=n(2),s=n(5),c=n(4),u=(n(6),Object(o.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(o.createElement)("path",{opacity:".87",fill:"none",d:"M0 0h24v24H0V0z"}),Object(o.createElement)("path",{d:"M3 5v14h17V5H3zm4 2v2H5V7h2zm-2 6v-2h2v2H5zm0 2h2v2H5v-2zm13 2H9v-2h9v2zm0-4H9v-2h9v2zm0-4H9V7h9v2z"})));Object(r.registerBlockType)(c.b,{title:Object(l.__)("Blog Posts Listing","full-site-editing"),description:Object(l.__)("Displays your latest Blog Posts.","full-site-editing"),icon:u,category:"layout",supports:{html:!1,multiple:!1,reusable:!1},attributes:c.a,edit:function(e){var t=e.attributes,n=e.setAttributes,r=e.isSelected;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(i.Placeholder,{icon:u,label:Object(l.__)("Your recent blog posts will be displayed here.","full-site-editing")},r?Object(o.createElement)(i.RangeControl,{label:Object(l.__)("Number of posts to show","full-site-editing"),value:t.postsPerPage,onChange:function(e){return n({postsPerPage:e})},min:1,max:50}):null),Object(o.createElement)(s.InspectorControls,null,Object(o.createElement)(i.PanelBody,null,Object(o.createElement)(i.RangeControl,{label:Object(l.__)("Number of posts","full-site-editing"),value:t.postsPerPage,onChange:function(e){return n({postsPerPage:e})},min:1,max:50}))))},save:function(){return null},transforms:{to:[{type:"block",blocks:["newspack-blocks/homepage-articles"],transform:function(e){var t=e.postsPerPage;return Object(r.createBlock)("newspack-blocks/homepage-articles",{postsToShow:t,showAvatar:!1,displayPostDate:!0,displayPostContent:!0})}}]}})}]));
readme.txt CHANGED
@@ -3,13 +3,14 @@ Contributors: alexislloyd, allancole, automattic, codebykat, copons, dmsnell, ge
3
  Tags: block, blocks, editor, gutenberg, page
4
  Requires at least: 5.0
5
  Tested up to: 5.3
6
- Stable tag: 0.10
7
  Requires PHP: 5.6.20
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
10
 
11
  Enhances your page creation workflow within the Block Editor.
12
 
 
13
  == Description ==
14
 
15
  This plugin comes with a custom block to display a list of your most recent blog posts, as well as a template selector
@@ -38,7 +39,12 @@ It adds an excerpt! And meta information! It really is much more useful, especia
38
 
39
  This plugin is experimental, so we don't provide any support for it outside of websites hosted on WordPress.com at this time.
40
 
 
41
  == Changelog ==
 
 
 
 
42
  = 0.10 =
43
  * Update page template selector with template preview.
44
 
3
  Tags: block, blocks, editor, gutenberg, page
4
  Requires at least: 5.0
5
  Tested up to: 5.3
6
+ Stable tag: 0.11
7
  Requires PHP: 5.6.20
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
10
 
11
  Enhances your page creation workflow within the Block Editor.
12
 
13
+
14
  == Description ==
15
 
16
  This plugin comes with a custom block to display a list of your most recent blog posts, as well as a template selector
39
 
40
  This plugin is experimental, so we don't provide any support for it outside of websites hosted on WordPress.com at this time.
41
 
42
+
43
  == Changelog ==
44
+
45
+ = 0.11 =
46
+ * Add color, background color, font size, and text alignment support to the Site Title, Site Description, and Navigation Menu blocks.
47
+
48
  = 0.10 =
49
  * Update page template selector with template preview.
50
 
starter-page-templates/dist/starter-page-templates.css CHANGED
@@ -1 +1 @@
1
- .page-template-modal-screen-overlay{animation:none;background-color:transparent}@media screen and (min-width:783px){body:not(.is-fullscreen-mode) .page-template-modal-screen-overlay{left:36px}}@media screen and (min-width:961px){body:not(.is-fullscreen-mode) .page-template-modal-screen-overlay{left:160px}}body.admin-bar:not(.is-fullscreen-mode) .page-template-modal-screen-overlay{top:46px}@media screen and (min-width:783px){body.admin-bar:not(.is-fullscreen-mode) .page-template-modal-screen-overlay{top:32px}}.page-template-modal{width:100%;height:100vh;animation:none;box-shadow:none;border:none;top:0;left:0;right:0;bottom:0;transform:none;max-width:none;max-height:none;background-color:#eee}.page-template-modal .components-modal__header-heading-container{border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;word-wrap:normal!important}.page-template-modal .components-modal__header:after,.page-template-modal__close-button{display:none}body.is-fullscreen-mode .page-template-modal__close-button{display:block;position:absolute;z-index:20;top:9px;width:36px;height:36px;left:8px}body.is-fullscreen-mode .page-template-modal .components-modal__header:after{display:block;position:absolute;content:" ";border-right:1px solid #e2e4e7;height:100%;left:54px}.page-template-modal .components-modal__content{overflow-y:scroll;-webkit-overflow-scrolling:touch}.page-template-modal__inner{position:relative;margin:0 auto;padding:0}@media screen and (max-width:659px){.page-template-modal__inner{padding:0 14% 3em}}@media screen and (max-width:440px){.page-template-modal__inner{padding:0 15px 3em}}@media screen and (min-width:1200px){.page-template-modal__inner{max-width:100%}}.page-template-modal__list .components-base-control__label{border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;word-wrap:normal!important}.page-template-modal__list .template-selector-control__options{display:grid;grid-template-columns:1fr;grid-gap:1.75em}@media screen and (min-width:660px){.page-template-modal__list .template-selector-control__options{margin-top:0;grid-template-columns:repeat(auto-fit,minmax(110px,1fr))}}@media screen and (min-width:1200px){.page-template-modal__list .template-selector-control__options{grid-template-columns:repeat(auto-fit,minmax(150px,1fr))}}.page-template-modal__list .template-selector-control__option{margin-bottom:4px}.page-template-modal__list .template-selector-item__label{display:block;width:100%;font-size:14px;text-align:center;border:2px solid #e2e4e7;border-radius:6px;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;overflow:hidden;background-color:#fff;position:relative}.page-template-modal__list .template-selector-item__label .template-selector-item__template-title{width:100%;position:absolute;bottom:0;left:0;height:40px;line-height:40px;background-color:#fff}.page-template-modal__list .template-selector-item__label:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px #00a0d2;outline:2px solid transparent}.page-template-modal__list .template-selector-item__label:hover{border:2px solid #c9c9ca}.page-template-modal__list .template-selector-item__label.is-selected{border:2px solid #555d66;outline:2px solid transparent;outline-offset:-2px}.page-template-modal__list .template-selector-item__label.is-selected:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px #00a0d2;border:2px solid #555d66;outline:4px solid transparent;outline-offset:-4px}.page-template-modal__list .template-selector-item__preview-wrap{width:100%;display:block;margin:0 auto;background:#fff;border-radius:0;overflow:hidden;height:0;padding-top:100%;box-sizing:content-box;position:relative;pointer-events:none;opacity:1}@media screen and (max-width:659px){.page-template-modal__list .template-selector-item__preview-wrap{padding-top:120%}}.page-template-modal__list .template-selector-item__preview-wrap.is-rendering{opacity:.5}.page-template-modal__list .template-selector-item__preview-wrap .block-editor-block-list__block,.page-template-modal__list .template-selector-item__preview-wrap .block-editor-block-list__layout{padding:inherit}.page-template-modal__list .template-selector-item__media{width:100%;display:block;position:absolute;top:0;left:0}@media screen and (max-width:659px){.page-template-modal__list .template-selector-control__template:first-child .template-selector-item__preview-wrap{padding-top:0;height:70px}}@media screen and (max-width:659px){.page-template-modal__list .template-selector-control__template:first-child .template-selector-item__template-title{height:70px;line-height:70px}}.page-template-modal__actions{display:flex;flex-direction:column;align-items:center}@media screen and (min-width:960px){.page-template-modal__actions{flex-direction:row;justify-content:flex-end}}@media screen and (max-width:960px){.page-template-modal__action{margin-bottom:1em}}@media screen and (min-width:960px){.page-template-modal__action-use{margin-right:1em}}@media screen and (min-width:660px){.page-template-modal__form{max-width:50%}}.page-template-modal__form-title{font-weight:700;margin-bottom:1em}@media screen and (max-width:659px){.page-template-modal__form-title{text-align:center}}.page-template-modal__buttons{position:absolute;right:0;top:0;z-index:10;height:56px;display:flex;align-items:center;padding-right:24px}@media screen and (max-width:659px){.page-template-modal__buttons{display:none}}.page-template-modal__buttons.is-visually-hidden{border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;word-wrap:normal!important}.page-template-modal__buttons .components-button{height:33px;line-height:32px}.template-selector-preview{position:fixed;top:111px;bottom:24px;right:24px;width:calc(50% - 50px);background:#fff;border-radius:2px;overflow-x:hidden;overflow-y:auto;box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.12),0 1px 5px 0 rgba(0,0,0,.2)}@media screen and (max-width:659px){.template-selector-preview{display:none}}.template-selector-preview .edit-post-visual-editor{margin:0;padding:0}.template-selector-preview .editor-styles-wrapper .template-selector-preview__offset-correction{position:relative;top:120px}.template-selector-preview .editor-styles-wrapper .editor-post-title{transform-origin:top left;width:960px;display:block;position:absolute;top:0}.template-selector-preview .editor-styles-wrapper .editor-post-title,.template-selector-preview .editor-styles-wrapper .editor-post-title__block,.template-selector-preview .editor-styles-wrapper .editor-post-title__input{padding-top:0;padding-bottom:0;margin-top:0;margin-bottom:0}.template-selector-preview .editor-styles-wrapper .editor-post-title .editor-post-title__input,.template-selector-preview .editor-styles-wrapper .editor-post-title__block .editor-post-title__input,.template-selector-preview .editor-styles-wrapper .editor-post-title__input .editor-post-title__input{margin:0;padding:0;height:120px;line-height:120px}@media screen and (min-width:783px){body:not(.is-fullscreen-mode) .template-selector-preview{width:calc(50% - 84px)}}@media screen and (min-width:961px){body:not(.is-fullscreen-mode) .template-selector-preview{width:calc(50% - 160px)}}.template-selector-preview__placeholder{position:absolute;top:50%;left:50%;transform:translateX(-50%);width:80%;text-align:center}.block-editor-block-preview__container .editor-styles-wrapper .wp-block,.template-selector-preview .editor-styles-wrapper .wp-block{width:100%}.block-editor-block-preview__container .editor-styles-wrapper .wp-block[data-type="core/cover"][data-align=full],.template-selector-preview .editor-styles-wrapper .wp-block[data-type="core/cover"][data-align=full]{margin:0}.block-editor-block-preview__container .editor-styles-wrapper .wp-block[data-type="core/cover"][data-align=full] .wp-block-cover,.template-selector-preview .editor-styles-wrapper .wp-block[data-type="core/cover"][data-align=full] .wp-block-cover{padding:0}.block-editor-block-preview__container .editor-styles-wrapper .wp-block-columns>.editor-inner-blocks>.editor-block-list__layout>[data-type="core/column"]>.editor-block-list__block-edit>div>.block-core-columns>.editor-inner-blocks,.template-selector-preview .editor-styles-wrapper .wp-block-columns>.editor-inner-blocks>.editor-block-list__layout>[data-type="core/column"]>.editor-block-list__block-edit>div>.block-core-columns>.editor-inner-blocks{margin-top:0;margin-bottom:0}.block-editor-block-preview__container .editor-styles-wrapper .block-editor-block-list__block[data-align=full],.template-selector-preview .editor-styles-wrapper .block-editor-block-list__block[data-align=full]{margin:0}@media screen and (min-width:600px){.block-editor-block-preview__container .editor-styles-wrapper .block-editor-block-list__block .block-editor-block-list__block-edit,.template-selector-preview .editor-styles-wrapper .block-editor-block-list__block .block-editor-block-list__block-edit{margin:0}}.block-editor-block-preview__container .editor-styles-wrapper .block-editor-block-list__block,.block-editor-block-preview__container .editor-styles-wrapper .block-editor-block-list__layout,.template-selector-preview .editor-styles-wrapper .block-editor-block-list__block,.template-selector-preview .editor-styles-wrapper .block-editor-block-list__layout{padding:inherit}.template-selector-item__preview-wrap .components-disabled,.template-selector-item__preview-wrap .components-disabled .editor-styles-wrapper,.template-selector-item__preview-wrap .edit-post-visual-editor,.template-selector-item__preview-wrap .edit-post-visual-editor .editor-styles-wrapper,.template-selector-preview .components-disabled,.template-selector-preview .components-disabled .editor-styles-wrapper,.template-selector-preview .edit-post-visual-editor,.template-selector-preview .edit-post-visual-editor .editor-styles-wrapper{height:100%}.page-template-modal__loading{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);display:flex;align-items:flex-end}.page-template-modal__loading .components-spinner{float:none}
1
+ .page-template-modal-screen-overlay{animation:none;background-color:transparent}@media screen and (min-width:783px){body:not(.is-fullscreen-mode) .page-template-modal-screen-overlay{left:36px}}@media screen and (min-width:961px){body:not(.is-fullscreen-mode) .page-template-modal-screen-overlay{left:160px}}body.admin-bar:not(.is-fullscreen-mode) .page-template-modal-screen-overlay{top:46px}@media screen and (min-width:783px){body.admin-bar:not(.is-fullscreen-mode) .page-template-modal-screen-overlay{top:32px}}.page-template-modal{width:100%;height:100vh;animation:none;box-shadow:none;border:none;top:0;left:0;right:0;bottom:0;transform:none;max-width:none;max-height:none;background-color:#eee}.page-template-modal .components-modal__header-heading-container{border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;word-wrap:normal!important}.page-template-modal .components-modal__header:after,.page-template-modal__close-button{display:none}body.is-fullscreen-mode .page-template-modal__close-button{display:block;position:absolute;z-index:20;top:9px;width:36px;height:36px;left:8px}body.is-fullscreen-mode .page-template-modal .components-modal__header:after{display:block;position:absolute;content:" ";border-right:1px solid #e2e4e7;height:100%;left:54px}.page-template-modal .components-modal__content{overflow-y:scroll;-webkit-overflow-scrolling:touch}.page-template-modal__inner{position:relative;margin:0 auto;padding:0}@media screen and (max-width:659px){.page-template-modal__inner{padding:0 14% 3em}}@media screen and (max-width:440px){.page-template-modal__inner{padding:0 15px 3em}}@media screen and (min-width:1200px){.page-template-modal__inner{max-width:100%}}@media screen and (min-width:1441px){.page-template-modal__inner{max-width:1440px;display:flex;align-content:flex-start;justify-content:space-between}}.page-template-modal__list .components-base-control__label{border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;word-wrap:normal!important}.page-template-modal__list .template-selector-control__options{display:grid;grid-template-columns:1fr;grid-gap:1.75em}@media screen and (min-width:660px){.page-template-modal__list .template-selector-control__options{margin-top:0;grid-template-columns:repeat(auto-fit,minmax(110px,1fr))}}.page-template-modal__list .template-selector-control__option{margin-bottom:4px}.page-template-modal__list .template-selector-item__label{display:block;width:100%;font-size:14px;text-align:center;border:2px solid #e2e4e7;border-radius:6px;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;overflow:hidden;background-color:#fff;position:relative}.page-template-modal__list .template-selector-item__label .template-selector-item__template-title{width:100%;position:absolute;bottom:0;left:0;height:40px;line-height:40px;background-color:#fff}.page-template-modal__list .template-selector-item__label:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px #00a0d2;outline:2px solid transparent}.page-template-modal__list .template-selector-item__label:hover{border:2px solid #c9c9ca}.page-template-modal__list .template-selector-item__label.is-selected{border:2px solid #555d66;outline:2px solid transparent;outline-offset:-2px}.page-template-modal__list .template-selector-item__label.is-selected:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px #00a0d2;border:2px solid #555d66;outline:4px solid transparent;outline-offset:-4px}.page-template-modal__list .template-selector-item__preview-wrap{width:100%;display:block;margin:0 auto;background:#fff;border-radius:0;overflow:hidden;height:0;padding-top:100%;box-sizing:content-box;position:relative;pointer-events:none;opacity:1}@media screen and (max-width:659px){.page-template-modal__list .template-selector-item__preview-wrap{padding-top:120%}}.page-template-modal__list .template-selector-item__preview-wrap.is-rendering{opacity:.5}.page-template-modal__list .template-selector-item__preview-wrap .block-editor-block-list__block,.page-template-modal__list .template-selector-item__preview-wrap .block-editor-block-list__layout{padding:inherit}.page-template-modal__list .template-selector-item__media{width:100%;display:block;position:absolute;top:0;left:0}@media screen and (max-width:659px){.page-template-modal__list .template-selector-control__template:first-child .template-selector-item__preview-wrap{padding-top:0;height:70px}}@media screen and (max-width:659px){.page-template-modal__list .template-selector-control__template:first-child .template-selector-item__template-title{height:70px;line-height:70px}}.page-template-modal__actions{display:flex;flex-direction:column;align-items:center}@media screen and (min-width:960px){.page-template-modal__actions{flex-direction:row;justify-content:flex-end}}@media screen and (max-width:960px){.page-template-modal__action{margin-bottom:1em}}@media screen and (min-width:960px){.page-template-modal__action-use{margin-right:1em}}@media screen and (min-width:660px){.page-template-modal__form{max-width:20%}}@media screen and (min-width:783px){.page-template-modal__form{max-width:30%}}@media screen and (min-width:1441px){.page-template-modal__form{width:30%}}.page-template-modal__form-title{font-weight:700;margin-bottom:1em}@media screen and (max-width:659px){.page-template-modal__form-title{text-align:center}}.page-template-modal__buttons{position:absolute;right:0;top:0;z-index:10;height:56px;display:flex;align-items:center;padding-right:24px}@media screen and (max-width:659px){.page-template-modal__buttons{display:none}}.page-template-modal__buttons.is-visually-hidden{border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;word-wrap:normal!important}.page-template-modal__buttons .components-button{height:33px;line-height:32px}.template-selector-preview{position:fixed;top:111px;bottom:24px;right:24px;width:calc(80% - 50px);background:#fff;border-radius:2px;overflow-x:hidden;overflow-y:auto;box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.12),0 1px 5px 0 rgba(0,0,0,.2)}@media screen and (max-width:659px){.template-selector-preview{display:none}}@media screen and (min-width:783px){.template-selector-preview{width:calc(70% - 50px)}}@media screen and (min-width:1441px){.template-selector-preview{position:unset;width:calc(70% - 84px);height:calc(100vh - 130px)}}.template-selector-preview .edit-post-visual-editor{margin:0;padding:0}.template-selector-preview .editor-styles-wrapper .template-selector-preview__offset-correction{position:relative;top:120px}.template-selector-preview .editor-styles-wrapper .editor-post-title{transform-origin:top left;width:960px;display:block;position:absolute;top:0}.template-selector-preview .editor-styles-wrapper .editor-post-title,.template-selector-preview .editor-styles-wrapper .editor-post-title__block,.template-selector-preview .editor-styles-wrapper .editor-post-title__input{padding-top:0;padding-bottom:0;margin-top:0;margin-bottom:0}.template-selector-preview .editor-styles-wrapper .editor-post-title .editor-post-title__input,.template-selector-preview .editor-styles-wrapper .editor-post-title__block .editor-post-title__input,.template-selector-preview .editor-styles-wrapper .editor-post-title__input .editor-post-title__input{margin:0;padding:0;height:120px;line-height:120px}@media screen and (min-width:783px){body:not(.is-fullscreen-mode) .template-selector-preview{width:calc(70% - 84px)}}@media screen and (min-width:961px){body:not(.is-fullscreen-mode) .template-selector-preview{width:calc(70% - 160px)}}@media screen and (min-width:1441px){body:not(.is-fullscreen-mode) .template-selector-preview{width:calc(70% - 84px)}}.template-selector-preview__placeholder{position:absolute;top:50%;left:50%;transform:translateX(-50%);width:80%;text-align:center}@media screen and (min-width:1441px){.template-selector-preview__placeholder{left:auto;right:0;transform:none;width:calc(70% - 84px)}}.block-editor-block-preview__container .editor-styles-wrapper .wp-block,.template-selector-preview .editor-styles-wrapper .wp-block{width:100%}.block-editor-block-preview__container .editor-styles-wrapper .wp-block[data-type="core/cover"][data-align=full],.template-selector-preview .editor-styles-wrapper .wp-block[data-type="core/cover"][data-align=full]{margin:0}.block-editor-block-preview__container .editor-styles-wrapper .wp-block[data-type="core/cover"][data-align=full] .wp-block-cover,.template-selector-preview .editor-styles-wrapper .wp-block[data-type="core/cover"][data-align=full] .wp-block-cover{padding:0}.block-editor-block-preview__container .editor-styles-wrapper .wp-block-columns>.editor-inner-blocks>.editor-block-list__layout>[data-type="core/column"]>.editor-block-list__block-edit>div>.block-core-columns>.editor-inner-blocks,.template-selector-preview .editor-styles-wrapper .wp-block-columns>.editor-inner-blocks>.editor-block-list__layout>[data-type="core/column"]>.editor-block-list__block-edit>div>.block-core-columns>.editor-inner-blocks{margin-top:0;margin-bottom:0}.block-editor-block-preview__container .editor-styles-wrapper .block-editor-block-list__block[data-align=full],.template-selector-preview .editor-styles-wrapper .block-editor-block-list__block[data-align=full]{margin:0}@media screen and (min-width:600px){.block-editor-block-preview__container .editor-styles-wrapper .block-editor-block-list__block .block-editor-block-list__block-edit,.template-selector-preview .editor-styles-wrapper .block-editor-block-list__block .block-editor-block-list__block-edit{margin:0}}.block-editor-block-preview__container .editor-styles-wrapper .block-editor-block-list__block,.block-editor-block-preview__container .editor-styles-wrapper .block-editor-block-list__layout,.template-selector-preview .editor-styles-wrapper .block-editor-block-list__block,.template-selector-preview .editor-styles-wrapper .block-editor-block-list__layout{padding:inherit}.template-selector-item__preview-wrap .components-disabled,.template-selector-item__preview-wrap .components-disabled .editor-styles-wrapper,.template-selector-item__preview-wrap .edit-post-visual-editor,.template-selector-item__preview-wrap .edit-post-visual-editor .editor-styles-wrapper,.template-selector-preview .components-disabled,.template-selector-preview .components-disabled .editor-styles-wrapper,.template-selector-preview .edit-post-visual-editor,.template-selector-preview .edit-post-visual-editor .editor-styles-wrapper{height:100%}.page-template-modal__loading{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);display:flex;align-items:flex-end}.page-template-modal__loading .components-spinner{float:none}
starter-page-templates/dist/starter-page-templates.rtl.css CHANGED
@@ -1 +1 @@
1
- .page-template-modal-screen-overlay{animation:none;background-color:transparent}@media screen and (min-width:783px){body:not(.is-fullscreen-mode) .page-template-modal-screen-overlay{right:36px}}@media screen and (min-width:961px){body:not(.is-fullscreen-mode) .page-template-modal-screen-overlay{right:160px}}body.admin-bar:not(.is-fullscreen-mode) .page-template-modal-screen-overlay{top:46px}@media screen and (min-width:783px){body.admin-bar:not(.is-fullscreen-mode) .page-template-modal-screen-overlay{top:32px}}.page-template-modal{width:100%;height:100vh;animation:none;box-shadow:none;border:none;top:0;right:0;left:0;bottom:0;transform:none;max-width:none;max-height:none;background-color:#eee}.page-template-modal .components-modal__header-heading-container{border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;word-wrap:normal!important}.page-template-modal .components-modal__header:after,.page-template-modal__close-button{display:none}body.is-fullscreen-mode .page-template-modal__close-button{display:block;position:absolute;z-index:20;top:9px;width:36px;height:36px;right:8px}body.is-fullscreen-mode .page-template-modal .components-modal__header:after{display:block;position:absolute;content:" ";border-left:1px solid #e2e4e7;height:100%;right:54px}.page-template-modal .components-modal__content{overflow-y:scroll;-webkit-overflow-scrolling:touch}.page-template-modal__inner{position:relative;margin:0 auto;padding:0}@media screen and (max-width:659px){.page-template-modal__inner{padding:0 14% 3em}}@media screen and (max-width:440px){.page-template-modal__inner{padding:0 15px 3em}}@media screen and (min-width:1200px){.page-template-modal__inner{max-width:100%}}.page-template-modal__list .components-base-control__label{border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;word-wrap:normal!important}.page-template-modal__list .template-selector-control__options{display:grid;grid-template-columns:1fr;grid-gap:1.75em}@media screen and (min-width:660px){.page-template-modal__list .template-selector-control__options{margin-top:0;grid-template-columns:repeat(auto-fit,minmax(110px,1fr))}}@media screen and (min-width:1200px){.page-template-modal__list .template-selector-control__options{grid-template-columns:repeat(auto-fit,minmax(150px,1fr))}}.page-template-modal__list .template-selector-control__option{margin-bottom:4px}.page-template-modal__list .template-selector-item__label{display:block;width:100%;font-size:14px;text-align:center;border:2px solid #e2e4e7;border-radius:6px;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;overflow:hidden;background-color:#fff;position:relative}.page-template-modal__list .template-selector-item__label .template-selector-item__template-title{width:100%;position:absolute;bottom:0;right:0;height:40px;line-height:40px;background-color:#fff}.page-template-modal__list .template-selector-item__label:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px #00a0d2;outline:2px solid transparent}.page-template-modal__list .template-selector-item__label:hover{border:2px solid #c9c9ca}.page-template-modal__list .template-selector-item__label.is-selected{border:2px solid #555d66;outline:2px solid transparent;outline-offset:-2px}.page-template-modal__list .template-selector-item__label.is-selected:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px #00a0d2;border:2px solid #555d66;outline:4px solid transparent;outline-offset:-4px}.page-template-modal__list .template-selector-item__preview-wrap{width:100%;display:block;margin:0 auto;background:#fff;border-radius:0;overflow:hidden;height:0;padding-top:100%;box-sizing:content-box;position:relative;pointer-events:none;opacity:1}@media screen and (max-width:659px){.page-template-modal__list .template-selector-item__preview-wrap{padding-top:120%}}.page-template-modal__list .template-selector-item__preview-wrap.is-rendering{opacity:.5}.page-template-modal__list .template-selector-item__preview-wrap .block-editor-block-list__block,.page-template-modal__list .template-selector-item__preview-wrap .block-editor-block-list__layout{padding:inherit}.page-template-modal__list .template-selector-item__media{width:100%;display:block;position:absolute;top:0;right:0}@media screen and (max-width:659px){.page-template-modal__list .template-selector-control__template:first-child .template-selector-item__preview-wrap{padding-top:0;height:70px}}@media screen and (max-width:659px){.page-template-modal__list .template-selector-control__template:first-child .template-selector-item__template-title{height:70px;line-height:70px}}.page-template-modal__actions{display:flex;flex-direction:column;align-items:center}@media screen and (min-width:960px){.page-template-modal__actions{flex-direction:row;justify-content:flex-end}}@media screen and (max-width:960px){.page-template-modal__action{margin-bottom:1em}}@media screen and (min-width:960px){.page-template-modal__action-use{margin-left:1em}}@media screen and (min-width:660px){.page-template-modal__form{max-width:50%}}.page-template-modal__form-title{font-weight:700;margin-bottom:1em}@media screen and (max-width:659px){.page-template-modal__form-title{text-align:center}}.page-template-modal__buttons{position:absolute;left:0;top:0;z-index:10;height:56px;display:flex;align-items:center;padding-left:24px}@media screen and (max-width:659px){.page-template-modal__buttons{display:none}}.page-template-modal__buttons.is-visually-hidden{border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;word-wrap:normal!important}.page-template-modal__buttons .components-button{height:33px;line-height:32px}.template-selector-preview{position:fixed;top:111px;bottom:24px;left:24px;width:calc(50% - 50px);background:#fff;border-radius:2px;overflow-x:hidden;overflow-y:auto;box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.12),0 1px 5px 0 rgba(0,0,0,.2)}@media screen and (max-width:659px){.template-selector-preview{display:none}}.template-selector-preview .edit-post-visual-editor{margin:0;padding:0}.template-selector-preview .editor-styles-wrapper .template-selector-preview__offset-correction{position:relative;top:120px}.template-selector-preview .editor-styles-wrapper .editor-post-title{transform-origin:top right;width:960px;display:block;position:absolute;top:0}.template-selector-preview .editor-styles-wrapper .editor-post-title,.template-selector-preview .editor-styles-wrapper .editor-post-title__block,.template-selector-preview .editor-styles-wrapper .editor-post-title__input{padding-top:0;padding-bottom:0;margin-top:0;margin-bottom:0}.template-selector-preview .editor-styles-wrapper .editor-post-title .editor-post-title__input,.template-selector-preview .editor-styles-wrapper .editor-post-title__block .editor-post-title__input,.template-selector-preview .editor-styles-wrapper .editor-post-title__input .editor-post-title__input{margin:0;padding:0;height:120px;line-height:120px}@media screen and (min-width:783px){body:not(.is-fullscreen-mode) .template-selector-preview{width:calc(50% - 84px)}}@media screen and (min-width:961px){body:not(.is-fullscreen-mode) .template-selector-preview{width:calc(50% - 160px)}}.template-selector-preview__placeholder{position:absolute;top:50%;right:50%;transform:translateX(50%);width:80%;text-align:center}.block-editor-block-preview__container .editor-styles-wrapper .wp-block,.template-selector-preview .editor-styles-wrapper .wp-block{width:100%}.block-editor-block-preview__container .editor-styles-wrapper .wp-block[data-type="core/cover"][data-align=full],.template-selector-preview .editor-styles-wrapper .wp-block[data-type="core/cover"][data-align=full]{margin:0}.block-editor-block-preview__container .editor-styles-wrapper .wp-block[data-type="core/cover"][data-align=full] .wp-block-cover,.template-selector-preview .editor-styles-wrapper .wp-block[data-type="core/cover"][data-align=full] .wp-block-cover{padding:0}.block-editor-block-preview__container .editor-styles-wrapper .wp-block-columns>.editor-inner-blocks>.editor-block-list__layout>[data-type="core/column"]>.editor-block-list__block-edit>div>.block-core-columns>.editor-inner-blocks,.template-selector-preview .editor-styles-wrapper .wp-block-columns>.editor-inner-blocks>.editor-block-list__layout>[data-type="core/column"]>.editor-block-list__block-edit>div>.block-core-columns>.editor-inner-blocks{margin-top:0;margin-bottom:0}.block-editor-block-preview__container .editor-styles-wrapper .block-editor-block-list__block[data-align=full],.template-selector-preview .editor-styles-wrapper .block-editor-block-list__block[data-align=full]{margin:0}@media screen and (min-width:600px){.block-editor-block-preview__container .editor-styles-wrapper .block-editor-block-list__block .block-editor-block-list__block-edit,.template-selector-preview .editor-styles-wrapper .block-editor-block-list__block .block-editor-block-list__block-edit{margin:0}}.block-editor-block-preview__container .editor-styles-wrapper .block-editor-block-list__block,.block-editor-block-preview__container .editor-styles-wrapper .block-editor-block-list__layout,.template-selector-preview .editor-styles-wrapper .block-editor-block-list__block,.template-selector-preview .editor-styles-wrapper .block-editor-block-list__layout{padding:inherit}.template-selector-item__preview-wrap .components-disabled,.template-selector-item__preview-wrap .components-disabled .editor-styles-wrapper,.template-selector-item__preview-wrap .edit-post-visual-editor,.template-selector-item__preview-wrap .edit-post-visual-editor .editor-styles-wrapper,.template-selector-preview .components-disabled,.template-selector-preview .components-disabled .editor-styles-wrapper,.template-selector-preview .edit-post-visual-editor,.template-selector-preview .edit-post-visual-editor .editor-styles-wrapper{height:100%}.page-template-modal__loading{position:absolute;top:50%;right:50%;transform:translate(50%,-50%);display:flex;align-items:flex-end}.page-template-modal__loading .components-spinner{float:none}
1
+ .page-template-modal-screen-overlay{animation:none;background-color:transparent}@media screen and (min-width:783px){body:not(.is-fullscreen-mode) .page-template-modal-screen-overlay{right:36px}}@media screen and (min-width:961px){body:not(.is-fullscreen-mode) .page-template-modal-screen-overlay{right:160px}}body.admin-bar:not(.is-fullscreen-mode) .page-template-modal-screen-overlay{top:46px}@media screen and (min-width:783px){body.admin-bar:not(.is-fullscreen-mode) .page-template-modal-screen-overlay{top:32px}}.page-template-modal{width:100%;height:100vh;animation:none;box-shadow:none;border:none;top:0;right:0;left:0;bottom:0;transform:none;max-width:none;max-height:none;background-color:#eee}.page-template-modal .components-modal__header-heading-container{border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;word-wrap:normal!important}.page-template-modal .components-modal__header:after,.page-template-modal__close-button{display:none}body.is-fullscreen-mode .page-template-modal__close-button{display:block;position:absolute;z-index:20;top:9px;width:36px;height:36px;right:8px}body.is-fullscreen-mode .page-template-modal .components-modal__header:after{display:block;position:absolute;content:" ";border-left:1px solid #e2e4e7;height:100%;right:54px}.page-template-modal .components-modal__content{overflow-y:scroll;-webkit-overflow-scrolling:touch}.page-template-modal__inner{position:relative;margin:0 auto;padding:0}@media screen and (max-width:659px){.page-template-modal__inner{padding:0 14% 3em}}@media screen and (max-width:440px){.page-template-modal__inner{padding:0 15px 3em}}@media screen and (min-width:1200px){.page-template-modal__inner{max-width:100%}}@media screen and (min-width:1441px){.page-template-modal__inner{max-width:1440px;display:flex;align-content:flex-start;justify-content:space-between}}.page-template-modal__list .components-base-control__label{border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;word-wrap:normal!important}.page-template-modal__list .template-selector-control__options{display:grid;grid-template-columns:1fr;grid-gap:1.75em}@media screen and (min-width:660px){.page-template-modal__list .template-selector-control__options{margin-top:0;grid-template-columns:repeat(auto-fit,minmax(110px,1fr))}}.page-template-modal__list .template-selector-control__option{margin-bottom:4px}.page-template-modal__list .template-selector-item__label{display:block;width:100%;font-size:14px;text-align:center;border:2px solid #e2e4e7;border-radius:6px;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;overflow:hidden;background-color:#fff;position:relative}.page-template-modal__list .template-selector-item__label .template-selector-item__template-title{width:100%;position:absolute;bottom:0;right:0;height:40px;line-height:40px;background-color:#fff}.page-template-modal__list .template-selector-item__label:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px #00a0d2;outline:2px solid transparent}.page-template-modal__list .template-selector-item__label:hover{border:2px solid #c9c9ca}.page-template-modal__list .template-selector-item__label.is-selected{border:2px solid #555d66;outline:2px solid transparent;outline-offset:-2px}.page-template-modal__list .template-selector-item__label.is-selected:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px #00a0d2;border:2px solid #555d66;outline:4px solid transparent;outline-offset:-4px}.page-template-modal__list .template-selector-item__preview-wrap{width:100%;display:block;margin:0 auto;background:#fff;border-radius:0;overflow:hidden;height:0;padding-top:100%;box-sizing:content-box;position:relative;pointer-events:none;opacity:1}@media screen and (max-width:659px){.page-template-modal__list .template-selector-item__preview-wrap{padding-top:120%}}.page-template-modal__list .template-selector-item__preview-wrap.is-rendering{opacity:.5}.page-template-modal__list .template-selector-item__preview-wrap .block-editor-block-list__block,.page-template-modal__list .template-selector-item__preview-wrap .block-editor-block-list__layout{padding:inherit}.page-template-modal__list .template-selector-item__media{width:100%;display:block;position:absolute;top:0;right:0}@media screen and (max-width:659px){.page-template-modal__list .template-selector-control__template:first-child .template-selector-item__preview-wrap{padding-top:0;height:70px}}@media screen and (max-width:659px){.page-template-modal__list .template-selector-control__template:first-child .template-selector-item__template-title{height:70px;line-height:70px}}.page-template-modal__actions{display:flex;flex-direction:column;align-items:center}@media screen and (min-width:960px){.page-template-modal__actions{flex-direction:row;justify-content:flex-end}}@media screen and (max-width:960px){.page-template-modal__action{margin-bottom:1em}}@media screen and (min-width:960px){.page-template-modal__action-use{margin-left:1em}}@media screen and (min-width:660px){.page-template-modal__form{max-width:20%}}@media screen and (min-width:783px){.page-template-modal__form{max-width:30%}}@media screen and (min-width:1441px){.page-template-modal__form{width:30%}}.page-template-modal__form-title{font-weight:700;margin-bottom:1em}@media screen and (max-width:659px){.page-template-modal__form-title{text-align:center}}.page-template-modal__buttons{position:absolute;left:0;top:0;z-index:10;height:56px;display:flex;align-items:center;padding-left:24px}@media screen and (max-width:659px){.page-template-modal__buttons{display:none}}.page-template-modal__buttons.is-visually-hidden{border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;word-wrap:normal!important}.page-template-modal__buttons .components-button{height:33px;line-height:32px}.template-selector-preview{position:fixed;top:111px;bottom:24px;left:24px;width:calc(80% - 50px);background:#fff;border-radius:2px;overflow-x:hidden;overflow-y:auto;box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.12),0 1px 5px 0 rgba(0,0,0,.2)}@media screen and (max-width:659px){.template-selector-preview{display:none}}@media screen and (min-width:783px){.template-selector-preview{width:calc(70% - 50px)}}@media screen and (min-width:1441px){.template-selector-preview{position:unset;width:calc(70% - 84px);height:calc(100vh - 130px)}}.template-selector-preview .edit-post-visual-editor{margin:0;padding:0}.template-selector-preview .editor-styles-wrapper .template-selector-preview__offset-correction{position:relative;top:120px}.template-selector-preview .editor-styles-wrapper .editor-post-title{transform-origin:top right;width:960px;display:block;position:absolute;top:0}.template-selector-preview .editor-styles-wrapper .editor-post-title,.template-selector-preview .editor-styles-wrapper .editor-post-title__block,.template-selector-preview .editor-styles-wrapper .editor-post-title__input{padding-top:0;padding-bottom:0;margin-top:0;margin-bottom:0}.template-selector-preview .editor-styles-wrapper .editor-post-title .editor-post-title__input,.template-selector-preview .editor-styles-wrapper .editor-post-title__block .editor-post-title__input,.template-selector-preview .editor-styles-wrapper .editor-post-title__input .editor-post-title__input{margin:0;padding:0;height:120px;line-height:120px}@media screen and (min-width:783px){body:not(.is-fullscreen-mode) .template-selector-preview{width:calc(70% - 84px)}}@media screen and (min-width:961px){body:not(.is-fullscreen-mode) .template-selector-preview{width:calc(70% - 160px)}}@media screen and (min-width:1441px){body:not(.is-fullscreen-mode) .template-selector-preview{width:calc(70% - 84px)}}.template-selector-preview__placeholder{position:absolute;top:50%;right:50%;transform:translateX(50%);width:80%;text-align:center}@media screen and (min-width:1441px){.template-selector-preview__placeholder{right:auto;left:0;transform:none;width:calc(70% - 84px)}}.block-editor-block-preview__container .editor-styles-wrapper .wp-block,.template-selector-preview .editor-styles-wrapper .wp-block{width:100%}.block-editor-block-preview__container .editor-styles-wrapper .wp-block[data-type="core/cover"][data-align=full],.template-selector-preview .editor-styles-wrapper .wp-block[data-type="core/cover"][data-align=full]{margin:0}.block-editor-block-preview__container .editor-styles-wrapper .wp-block[data-type="core/cover"][data-align=full] .wp-block-cover,.template-selector-preview .editor-styles-wrapper .wp-block[data-type="core/cover"][data-align=full] .wp-block-cover{padding:0}.block-editor-block-preview__container .editor-styles-wrapper .wp-block-columns>.editor-inner-blocks>.editor-block-list__layout>[data-type="core/column"]>.editor-block-list__block-edit>div>.block-core-columns>.editor-inner-blocks,.template-selector-preview .editor-styles-wrapper .wp-block-columns>.editor-inner-blocks>.editor-block-list__layout>[data-type="core/column"]>.editor-block-list__block-edit>div>.block-core-columns>.editor-inner-blocks{margin-top:0;margin-bottom:0}.block-editor-block-preview__container .editor-styles-wrapper .block-editor-block-list__block[data-align=full],.template-selector-preview .editor-styles-wrapper .block-editor-block-list__block[data-align=full]{margin:0}@media screen and (min-width:600px){.block-editor-block-preview__container .editor-styles-wrapper .block-editor-block-list__block .block-editor-block-list__block-edit,.template-selector-preview .editor-styles-wrapper .block-editor-block-list__block .block-editor-block-list__block-edit{margin:0}}.block-editor-block-preview__container .editor-styles-wrapper .block-editor-block-list__block,.block-editor-block-preview__container .editor-styles-wrapper .block-editor-block-list__layout,.template-selector-preview .editor-styles-wrapper .block-editor-block-list__block,.template-selector-preview .editor-styles-wrapper .block-editor-block-list__layout{padding:inherit}.template-selector-item__preview-wrap .components-disabled,.template-selector-item__preview-wrap .components-disabled .editor-styles-wrapper,.template-selector-item__preview-wrap .edit-post-visual-editor,.template-selector-item__preview-wrap .edit-post-visual-editor .editor-styles-wrapper,.template-selector-preview .components-disabled,.template-selector-preview .components-disabled .editor-styles-wrapper,.template-selector-preview .edit-post-visual-editor,.template-selector-preview .edit-post-visual-editor .editor-styles-wrapper{height:100%}.page-template-modal__loading{position:absolute;top:50%;right:50%;transform:translate(50%,-50%);display:flex;align-items:flex-end}.page-template-modal__loading .components-spinner{float:none}
starter-page-templates/page-template-modal/components/test/__snapshots__/template-selector-control-test.js.snap CHANGED
@@ -36,6 +36,7 @@ exports[`TemplateSelectorControl Basic rendering renders with required props 1`]
36
  />
37
  </div>
38
  <span
 
39
  id="label-template-selector-control-17-blank"
40
  >
41
  Blank
@@ -61,6 +62,7 @@ exports[`TemplateSelectorControl Basic rendering renders with required props 1`]
61
  />
62
  </div>
63
  <span
 
64
  id="label-template-selector-control-17-template-1"
65
  >
66
  Template 1
@@ -86,6 +88,7 @@ exports[`TemplateSelectorControl Basic rendering renders with required props 1`]
86
  />
87
  </div>
88
  <span
 
89
  id="label-template-selector-control-17-template-2"
90
  >
91
  Template 2
@@ -111,6 +114,7 @@ exports[`TemplateSelectorControl Basic rendering renders with required props 1`]
111
  />
112
  </div>
113
  <span
 
114
  id="label-template-selector-control-17-template-3"
115
  >
116
  Template 3
36
  />
37
  </div>
38
  <span
39
+ class="template-selector-item__template-title"
40
  id="label-template-selector-control-17-blank"
41
  >
42
  Blank
62
  />
63
  </div>
64
  <span
65
+ class="template-selector-item__template-title"
66
  id="label-template-selector-control-17-template-1"
67
  >
68
  Template 1
88
  />
89
  </div>
90
  <span
91
+ class="template-selector-item__template-title"
92
  id="label-template-selector-control-17-template-2"
93
  >
94
  Template 2
114
  />
115
  </div>
116
  <span
117
+ class="template-selector-item__template-title"
118
  id="label-template-selector-control-17-template-3"
119
  >
120
  Template 3
starter-page-templates/page-template-modal/components/test/__snapshots__/template-selector-preview-test.js.snap CHANGED
@@ -20,10 +20,9 @@ exports[`TemplateSelectorPreview Basic rendering renders the preview when blocks
20
  >
21
  <div
22
  class="editor-post-title"
23
- style="transform: none;"
24
  >
25
  <div
26
- class="editor-post-title__block"
27
  >
28
  <textarea
29
  class="editor-post-title__input"
@@ -31,9 +30,13 @@ exports[`TemplateSelectorPreview Basic rendering renders the preview when blocks
31
  </div>
32
  </div>
33
  <div
34
- data-testid="block-template-preview"
35
  >
36
- MockedBlockPreview
 
 
 
 
37
  </div>
38
  </div>
39
  </div>
20
  >
21
  <div
22
  class="editor-post-title"
 
23
  >
24
  <div
25
+ class="wp-block editor-post-title__block"
26
  >
27
  <textarea
28
  class="editor-post-title__input"
30
  </div>
31
  </div>
32
  <div
33
+ class="template-selector-preview__offset-correction"
34
  >
35
+ <div
36
+ data-testid="block-template-preview"
37
+ >
38
+ MockedBlockPreview
39
+ </div>
40
  </div>
41
  </div>
42
  </div>
starter-page-templates/page-template-modal/styles/starter-page-templates-editor.scss CHANGED
@@ -121,6 +121,13 @@ body.is-fullscreen-mode {
121
  @media screen and ( min-width: 1200px ) {
122
  max-width: 100%;
123
  }
 
 
 
 
 
 
 
124
  }
125
 
126
  .page-template-modal__list {
@@ -143,15 +150,6 @@ body.is-fullscreen-mode {
143
  ); // allow grid to take over number of cols on large screens
144
  // stylelint-enable unit-whitelist
145
  }
146
-
147
- @media screen and ( min-width: 1200px ) {
148
- // stylelint-disable unit-whitelist
149
- grid-template-columns: repeat(
150
- auto-fit,
151
- minmax( 150px, 1fr )
152
- ); // allow grid to take over number of cols on large screens
153
- // stylelint-enable unit-whitelist
154
- }
155
  }
156
 
157
  .template-selector-control__option {
@@ -291,7 +289,15 @@ body.is-fullscreen-mode {
291
 
292
  .page-template-modal__form {
293
  @media screen and ( min-width: 660px ) {
294
- max-width: 50%;
 
 
 
 
 
 
 
 
295
  }
296
  }
297
 
@@ -333,11 +339,21 @@ body.is-fullscreen-mode {
333
  display: none;
334
  }
335
 
 
 
 
 
 
 
 
 
 
 
336
  position: fixed;
337
  top: 111px;
338
  bottom: 24px;
339
  right: 24px;
340
- width: calc( 50% - 50px );
341
  background: $template-selector-empty-background;
342
  border-radius: 2px;
343
  overflow-x: hidden;
@@ -382,11 +398,15 @@ body.is-fullscreen-mode {
382
 
383
  body:not( .is-fullscreen-mode ) .template-selector-preview {
384
  @media screen and ( min-width: 783px ) {
385
- width: calc( 50% - #{$wp-org-sidebar-reduced + (24px * 2 ) } );
386
  }
387
 
388
  @media screen and ( min-width: 961px ) {
389
- width: calc( 50% - #{$wp-org-sidebar-full } );
 
 
 
 
390
  }
391
  }
392
 
@@ -397,6 +417,13 @@ body:not( .is-fullscreen-mode ) .template-selector-preview {
397
  transform: translateX( -50% );
398
  width: 80%;
399
  text-align: center;
 
 
 
 
 
 
 
400
  }
401
 
402
  // Preview adjustments.
121
  @media screen and ( min-width: 1200px ) {
122
  max-width: 100%;
123
  }
124
+
125
+ @media screen and ( min-width: 1441px ) {
126
+ max-width: 1440px;
127
+ display: flex;
128
+ align-content: flex-start;
129
+ justify-content: space-between;
130
+ }
131
  }
132
 
133
  .page-template-modal__list {
150
  ); // allow grid to take over number of cols on large screens
151
  // stylelint-enable unit-whitelist
152
  }
 
 
 
 
 
 
 
 
 
153
  }
154
 
155
  .template-selector-control__option {
289
 
290
  .page-template-modal__form {
291
  @media screen and ( min-width: 660px ) {
292
+ max-width: 20%;
293
+ }
294
+
295
+ @media screen and ( min-width: 783px ) {
296
+ max-width: 30%;
297
+ }
298
+
299
+ @media screen and ( min-width: 1441px ) {
300
+ width: 30%;
301
  }
302
  }
303
 
339
  display: none;
340
  }
341
 
342
+ @media screen and ( min-width: 783px ) {
343
+ width: calc( 70% - 50px );
344
+ }
345
+
346
+ @media screen and ( min-width: 1441px ) {
347
+ position: unset;
348
+ width: calc( 70% - 84px );
349
+ height: calc( 100vh - 130px );
350
+ }
351
+
352
  position: fixed;
353
  top: 111px;
354
  bottom: 24px;
355
  right: 24px;
356
+ width: calc( 80% - 50px );
357
  background: $template-selector-empty-background;
358
  border-radius: 2px;
359
  overflow-x: hidden;
398
 
399
  body:not( .is-fullscreen-mode ) .template-selector-preview {
400
  @media screen and ( min-width: 783px ) {
401
+ width: calc( 70% - #{$wp-org-sidebar-reduced + (24px * 2 ) } );
402
  }
403
 
404
  @media screen and ( min-width: 961px ) {
405
+ width: calc( 70% - #{$wp-org-sidebar-full } );
406
+ }
407
+
408
+ @media screen and ( min-width: 1441px ) {
409
+ width: calc( 70% - #{$wp-org-sidebar-reduced + (24px * 2 ) } );
410
  }
411
  }
412
 
417
  transform: translateX( -50% );
418
  width: 80%;
419
  text-align: center;
420
+
421
+ @media screen and ( min-width: 1441px ) {
422
+ left: auto;
423
+ right: 0;
424
+ transform: none;
425
+ width: calc( 70% - #{$wp-org-sidebar-reduced + (24px * 2 ) } );
426
+ }
427
  }
428
 
429
  // Preview adjustments.