Full Site Editing - Version 0.2.1

Version Description

  • Bug fix with sub-locales.
Download this release

Release Info

Developer obenland
Plugin Icon wp plugin Full Site Editing
Version 0.2.1
Comparing to
See all releases

Code changes from version 0.2 to 0.2.1

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.2
6
  * Author: Automattic
7
  * Author URI: https://automattic.com/wordpress-plugins/
8
  * License: GPLv2 or later
@@ -11,6 +11,15 @@
11
  * @package full-site-editing
12
  */
13
 
 
 
 
 
 
 
 
 
 
14
  /**
15
  * Load Full Site Editing.
16
  */
@@ -30,6 +39,7 @@ function a8c_load_full_site_editing() {
30
  require_once __DIR__ . '/full-site-editing/blocks/navigation-menu/index.php';
31
  require_once __DIR__ . '/full-site-editing/blocks/post-content/index.php';
32
  require_once __DIR__ . '/full-site-editing/blocks/site-description/index.php';
 
33
  require_once __DIR__ . '/full-site-editing/blocks/template/index.php';
34
  require_once __DIR__ . '/full-site-editing/blocks/site-logo/index.php';
35
  require_once __DIR__ . '/full-site-editing/class-a8c-rest-templates-controller.php';
@@ -98,7 +108,7 @@ function a8c_fse_on_plugin_activation() {
98
  /**
99
  * Can be used to disable Full Site Editing functionality.
100
  *
101
- * @since 0.1
102
  *
103
  * @param bool true if Full Site Editing should be disabled, false otherwise.
104
  */
2
  /**
3
  * Plugin Name: Full Site Editing
4
  * Description: Enhances your page creation workflow within the Block Editor.
5
+ * Version: 0.2.1
6
  * Author: Automattic
7
  * Author URI: https://automattic.com/wordpress-plugins/
8
  * License: GPLv2 or later
11
  * @package full-site-editing
12
  */
13
 
14
+ /**
15
+ * Plugin version.
16
+ *
17
+ * Can be used in cache keys to invalidate caches on plugin update.
18
+ *
19
+ * @var string
20
+ */
21
+ define( 'A8C_FSE_VERSION', '0.2.1' );
22
+
23
  /**
24
  * Load Full Site Editing.
25
  */
39
  require_once __DIR__ . '/full-site-editing/blocks/navigation-menu/index.php';
40
  require_once __DIR__ . '/full-site-editing/blocks/post-content/index.php';
41
  require_once __DIR__ . '/full-site-editing/blocks/site-description/index.php';
42
+ require_once __DIR__ . '/full-site-editing/blocks/site-title/index.php';
43
  require_once __DIR__ . '/full-site-editing/blocks/template/index.php';
44
  require_once __DIR__ . '/full-site-editing/blocks/site-logo/index.php';
45
  require_once __DIR__ . '/full-site-editing/class-a8c-rest-templates-controller.php';
108
  /**
109
  * Can be used to disable Full Site Editing functionality.
110
  *
111
+ * @since 0.2
112
  *
113
  * @param bool true if Full Site Editing should be disabled, false otherwise.
114
  */
full-site-editing/blocks/post-content/index.js CHANGED
@@ -3,7 +3,7 @@
3
  * WordPress dependencies
4
  */
5
  import { registerBlockType } from '@wordpress/blocks';
6
- import { InnerBlocks } from '@wordpress/block-editor';
7
  import { __ } from '@wordpress/i18n';
8
 
9
  /**
3
  * WordPress dependencies
4
  */
5
  import { registerBlockType } from '@wordpress/blocks';
6
+ import { InnerBlocks } from '@wordpress/editor';
7
  import { __ } from '@wordpress/i18n';
8
 
9
  /**
full-site-editing/blocks/site-description/edit.js CHANGED
@@ -2,8 +2,8 @@
2
  * External dependencies
3
  */
4
  import apiFetch from '@wordpress/api-fetch';
5
- import { PlainText } from '@wordpress/block-editor';
6
- import { withNotices } from '@wordpress/components';
7
  import { compose } from '@wordpress/compose';
8
  import { withSelect } from '@wordpress/data';
9
  import { Component, Fragment } from '@wordpress/element';
@@ -13,6 +13,8 @@ class SiteDescriptionEdit extends Component {
13
  state = {
14
  description: __( 'Site description loading…' ),
15
  initialDescription: '',
 
 
16
  };
17
 
18
  componentDidMount() {
@@ -29,7 +31,7 @@ class SiteDescriptionEdit extends Component {
29
 
30
  componentDidUpdate( prevProps ) {
31
  const { description, initialDescription } = this.state;
32
- const { shouldUpdateSiteOption, noticeOperations, isSelected } = this.props;
33
 
34
  const descriptionUnchanged = description && description.trim() === initialDescription.trim();
35
  const descriptionIsEmpty = ! description || description.trim().length === 0;
@@ -45,22 +47,49 @@ class SiteDescriptionEdit extends Component {
45
  }
46
 
47
  if ( ! prevProps.shouldUpdateSiteOption && shouldUpdateSiteOption ) {
48
- apiFetch( { path: '/wp/v2/settings', method: 'POST', data: { description } } )
49
- .then( () => this.updateInitialDescription() )
50
- .catch( ( { message } ) => {
51
- noticeOperations.createErrorNotice( message );
52
- this.revertDescription();
53
- } );
54
  }
55
  }
56
 
57
- revertDescription = () => this.setState( { description: this.state.initialDescription } );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
58
 
59
- updateInitialDescription = () => this.setState( { initialDescription: this.state.description } );
 
 
 
 
 
 
60
 
61
  render() {
62
  const { className, noticeUI } = this.props;
63
- const { description } = this.state;
64
 
65
  return (
66
  <Fragment>
@@ -68,10 +97,22 @@ class SiteDescriptionEdit extends Component {
68
  <PlainText
69
  className={ className }
70
  value={ description }
71
- onChange={ value => this.setState( { description: value } ) }
72
  placeholder={ __( 'Site Description' ) }
73
  aria-label={ __( 'Site Description' ) }
74
  />
 
 
 
 
 
 
 
 
 
 
 
 
75
  </Fragment>
76
  );
77
  }
2
  * External dependencies
3
  */
4
  import apiFetch from '@wordpress/api-fetch';
5
+ import { PlainText } from '@wordpress/editor';
6
+ import { withNotices, Button } from '@wordpress/components';
7
  import { compose } from '@wordpress/compose';
8
  import { withSelect } from '@wordpress/data';
9
  import { Component, Fragment } from '@wordpress/element';
13
  state = {
14
  description: __( 'Site description loading…' ),
15
  initialDescription: '',
16
+ isDirty: false,
17
+ isSaving: false,
18
  };
19
 
20
  componentDidMount() {
31
 
32
  componentDidUpdate( prevProps ) {
33
  const { description, initialDescription } = this.state;
34
+ const { shouldUpdateSiteOption, isSelected } = this.props;
35
 
36
  const descriptionUnchanged = description && description.trim() === initialDescription.trim();
37
  const descriptionIsEmpty = ! description || description.trim().length === 0;
47
  }
48
 
49
  if ( ! prevProps.shouldUpdateSiteOption && shouldUpdateSiteOption ) {
50
+ this.saveSiteDescription( description );
 
 
 
 
 
51
  }
52
  }
53
 
54
+ onSave = () => {
55
+ const { description, initialDescription } = this.state;
56
+ const descriptionUnchanged = description && description.trim() === initialDescription.trim();
57
+
58
+ if ( descriptionUnchanged ) {
59
+ this.setState( { isDirty: false } );
60
+ return;
61
+ }
62
+ this.saveSiteDescription( description );
63
+ };
64
+
65
+ saveSiteDescription( description ) {
66
+ const { noticeOperations } = this.props;
67
+ this.setState( { isSaving: true } );
68
+ apiFetch( { path: '/wp/v2/settings', method: 'POST', data: { description } } )
69
+ .then( () => this.updateInitialDescription() )
70
+ .catch( ( { message } ) => {
71
+ noticeOperations.createErrorNotice( message );
72
+ this.revertDescription();
73
+ } );
74
+ }
75
+
76
+ revertDescription = () =>
77
+ this.setState( {
78
+ description: this.state.initialDescription,
79
+ isSaving: false,
80
+ } );
81
 
82
+ updateInitialDescription = () => {
83
+ this.setState( {
84
+ initialDescription: this.state.description,
85
+ isDirty: false,
86
+ isSaving: false,
87
+ } );
88
+ };
89
 
90
  render() {
91
  const { className, noticeUI } = this.props;
92
+ const { description, isDirty, isSaving } = this.state;
93
 
94
  return (
95
  <Fragment>
97
  <PlainText
98
  className={ className }
99
  value={ description }
100
+ onChange={ value => this.setState( { description: value, isDirty: true } ) }
101
  placeholder={ __( 'Site Description' ) }
102
  aria-label={ __( 'Site Description' ) }
103
  />
104
+ { isDirty && (
105
+ <Button
106
+ ref={ this.editButton }
107
+ isLarge
108
+ className="site-description__save-button"
109
+ disabled={ isSaving }
110
+ isBusy={ isSaving }
111
+ onClick={ this.onSave }
112
+ >
113
+ { __( 'Save' ) }
114
+ </Button>
115
+ ) }
116
  </Fragment>
117
  );
118
  }
full-site-editing/blocks/site-description/index.js CHANGED
@@ -11,7 +11,7 @@ import edit from './edit';
11
  import './style.scss';
12
 
13
  registerBlockType( 'a8c/site-description', {
14
- title: __( 'Site Description2' ),
15
  description: __( 'Site description, also known as the tagline.' ),
16
  icon: 'layout',
17
  category: 'layout',
11
  import './style.scss';
12
 
13
  registerBlockType( 'a8c/site-description', {
14
+ title: __( 'Site Description' ),
15
  description: __( 'Site description, also known as the tagline.' ),
16
  icon: 'layout',
17
  category: 'layout',
full-site-editing/blocks/site-description/style.scss CHANGED
@@ -1,10 +1,16 @@
1
- .block-editor .wp-block-a8c-site-description {
2
- &, &:focus {
3
- display: inline;
4
- color: #767676;
5
- font-size: 1.125em;
6
- font-weight: normal;
7
- letter-spacing: -0.01em;
8
- margin: 0;
 
 
 
 
 
 
9
  }
10
  }
1
+ .block-editor {
2
+ .wp-block-a8c-site-description {
3
+ &,&:focus {
4
+ display: inline;
5
+ color: #767676;
6
+ font-size: 1.125em;
7
+ font-weight: normal;
8
+ letter-spacing: -0.01em;
9
+ margin: 0;
10
+ }
11
+ }
12
+ .site-description__save-button {
13
+ margin-left: auto;
14
+ display: block;
15
  }
16
  }
full-site-editing/class-full-site-editing.php CHANGED
@@ -372,6 +372,13 @@ class Full_Site_Editing {
372
  'render_callback' => 'render_site_logo',
373
  )
374
  );
 
 
 
 
 
 
 
375
  }
376
 
377
  /**
@@ -448,15 +455,15 @@ class Full_Site_Editing {
448
  return;
449
  }
450
 
451
- $template_id = get_post_meta( $post->ID, '_wp_template_id', true );
 
452
  //bail if the post has no tempalte id assigned
453
- if ( ! $template_id ) {
454
  return;
455
  }
456
 
457
- $template = get_post( $template_id );
458
  $wrapped_post_content = sprintf( '<!-- wp:a8c/post-content -->%s<!-- /wp:a8c/post-content -->', $post->post_content );
459
- $post->post_content = str_replace( '<!-- wp:a8c/post-content /-->', $wrapped_post_content, $template->post_content );
460
  }
461
 
462
  /**
372
  'render_callback' => 'render_site_logo',
373
  )
374
  );
375
+
376
+ register_block_type(
377
+ 'a8c/site-title',
378
+ array(
379
+ 'render_callback' => 'render_site_title_block',
380
+ )
381
+ );
382
  }
383
 
384
  /**
455
  return;
456
  }
457
 
458
+ $template = new A8C_WP_Template( $post->ID );
459
+
460
  //bail if the post has no tempalte id assigned
461
+ if ( ! $template->get_template_id() ) {
462
  return;
463
  }
464
 
 
465
  $wrapped_post_content = sprintf( '<!-- wp:a8c/post-content -->%s<!-- /wp:a8c/post-content -->', $post->post_content );
466
+ $post->post_content = str_replace( '<!-- wp:a8c/post-content /-->', $wrapped_post_content, $template->get_template_content() );
467
  }
468
 
469
  /**
full-site-editing/dist/full-site-editing.css CHANGED
@@ -1 +1 @@
1
- .wp-block-a8c-navigation-menu .main-navigation{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;font-size:1.125em;font-weight:700;letter-spacing:-.02em;line-height:1.2;pointer-events:none;-webkit-font-smoothing:antialiased}.wp-block-a8c-navigation-menu .main-navigation .main-menu{display:inline-block;margin:0;padding:0}.wp-block-a8c-navigation-menu .main-navigation .main-menu>li{color:#0073aa;display:inline;position:relative}.wp-block-a8c-navigation-menu .main-navigation .main-menu>li>a{font-weight:700;color:#0073aa;margin-right:.5rem}.main-navigation .main-menu>li:last-child.menu-item-has-children .submenu-expand,.wp-block-a8c-navigation-menu .main-navigation .main-menu>li:last-child>a{margin-right:0}.wp-block-a8c-navigation-menu .main-navigation .main-menu>li.menu-item-has-children>a{margin-right:.125rem}.wp-block-a8c-navigation-menu .main-navigation .main-menu>li.menu-item-has-children{display:inline-block;position:inherit}.wp-block-a8c-navigation-menu .main-navigation .main-menu>li.menu-item-has-children .submenu-expand{display:inline-block;margin-right:.25rem}.wp-block-a8c-navigation-menu .main-navigation .main-menu>li.menu-item-has-children .submenu-expand svg{position:relative;top:.3rem}.main-navigation .main-menu>li>a:hover+svg,.wp-block-a8c-navigation-menu .main-navigation .main-menu>li>a:hover{color:#005177}.wp-block-a8c-navigation-menu .main-navigation svg{transition:fill .12s ease-in-out;fill:currentColor}.wp-block-a8c-navigation-menu .main-navigation a{text-decoration:none}.wp-block-a8c-navigation-menu .main-navigation button{display:inline-block;border:none;padding:0;margin:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;font-size:.88889em;font-weight:700;line-height:1.2;text-decoration:none;vertical-align:bottom;background:transparent;color:inherit;cursor:pointer;transition:background .25s ease-in-out,transform .15s ease;-webkit-appearance:none;-moz-appearance:none}.wp-block-a8c-navigation-menu .main-menu-more{display:none}.wp-block-a8c-navigation-menu .social-navigation{line-height:1.25;margin-top:.5rem;text-align:left}.wp-block-a8c-navigation-menu .social-navigation ul.social-links-menu{content:"";display:inline-block;margin:0;padding:0}.wp-block-a8c-navigation-menu .social-navigation ul.social-links-menu li{display:inline-block;vertical-align:bottom;vertical-align:-webkit-baseline-middle;list-style:none}.wp-block-a8c-navigation-menu .social-navigation ul.social-links-menu li a svg{display:block;width:32px;height:32px;transform:translateZ(0)}.wp-block-a8c-navigation-menu .footer-navigation .footer-menu{display:inline;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;font-size:.71111em;padding-left:0}.wp-block-a8c-navigation-menu .footer-navigation .footer-menu li{display:inline;margin-right:1rem}.wp-block-a8c-navigation-menu .footer-navigation .footer-menu a{text-decoration:none;color:#767676}.wp-block-a8c-navigation-menu .footer-navigation .footer-menu a:hover{text-decoration:none;color:#0073aa}.editor-styles-wrapper .wp-block-a8c-navigation-menu-toolbar a,.editor-styles-wrapper .wp-block-a8c-navigation-menu-toolbar a:hover{color:#555d66}.a8c-post-autocomplete{position:relative}.a8c-post-autocomplete .components-spinner{bottom:7px;position:absolute;right:-5px}.a8c-post-autocomplete__suggestions{max-height:200px;overflow-y:auto;width:302px}.a8c-post-autocomplete__suggestions .components-button{display:block;height:auto;min-height:30px;white-space:normal;width:100%;word-wrap:break-word}.post-content-block.alignfull{padding:0 12px}.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}.block-editor .wp-block-a8c-site-description,.block-editor .wp-block-a8c-site-description:focus{display:inline;color:#767676;font-size:1.125em;font-weight:400;letter-spacing:-.01em;margin:0}.template-block{min-height:200px}.template-block:hover .template-block__overlay{display:flex}.template-block.alignfull{padding:0 12px}.template-block__selector{width:300px}.template-block__selector a{font-family:sans-serif;font-size:13px;padding-left:8px}.template-block__content{pointer-events:none}.template-block__content:after{content:"";clear:both;display:table}.template-block__overlay{display:none;position:absolute;top:0;left:0;width:100%;height:100%}.wp-block-a8c-site-logo{pointer-events:none}
1
+ .wp-block-a8c-navigation-menu .main-navigation{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;font-size:1.125em;font-weight:700;letter-spacing:-.02em;line-height:1.2;pointer-events:none;-webkit-font-smoothing:antialiased}.wp-block-a8c-navigation-menu .main-navigation .main-menu{display:inline-block;margin:0;padding:0}.wp-block-a8c-navigation-menu .main-navigation .main-menu>li{color:#0073aa;display:inline;position:relative}.wp-block-a8c-navigation-menu .main-navigation .main-menu>li>a{font-weight:700;color:#0073aa;margin-right:.5rem}.main-navigation .main-menu>li:last-child.menu-item-has-children .submenu-expand,.wp-block-a8c-navigation-menu .main-navigation .main-menu>li:last-child>a{margin-right:0}.wp-block-a8c-navigation-menu .main-navigation .main-menu>li.menu-item-has-children>a{margin-right:.125rem}.wp-block-a8c-navigation-menu .main-navigation .main-menu>li.menu-item-has-children{display:inline-block;position:inherit}.wp-block-a8c-navigation-menu .main-navigation .main-menu>li.menu-item-has-children .submenu-expand{display:inline-block;margin-right:.25rem}.wp-block-a8c-navigation-menu .main-navigation .main-menu>li.menu-item-has-children .submenu-expand svg{position:relative;top:.3rem}.main-navigation .main-menu>li>a:hover+svg,.wp-block-a8c-navigation-menu .main-navigation .main-menu>li>a:hover{color:#005177}.wp-block-a8c-navigation-menu .main-navigation svg{transition:fill .12s ease-in-out;fill:currentColor}.wp-block-a8c-navigation-menu .main-navigation a{text-decoration:none}.wp-block-a8c-navigation-menu .main-navigation button{display:inline-block;border:none;padding:0;margin:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;font-size:.88889em;font-weight:700;line-height:1.2;text-decoration:none;vertical-align:bottom;background:transparent;color:inherit;cursor:pointer;transition:background .25s ease-in-out,transform .15s ease;-webkit-appearance:none;-moz-appearance:none}.wp-block-a8c-navigation-menu .main-menu-more{display:none}.wp-block-a8c-navigation-menu .social-navigation{line-height:1.25;margin-top:.5rem;text-align:left}.wp-block-a8c-navigation-menu .social-navigation ul.social-links-menu{content:"";display:inline-block;margin:0;padding:0}.wp-block-a8c-navigation-menu .social-navigation ul.social-links-menu li{display:inline-block;vertical-align:bottom;vertical-align:-webkit-baseline-middle;list-style:none}.wp-block-a8c-navigation-menu .social-navigation ul.social-links-menu li a svg{display:block;width:32px;height:32px;transform:translateZ(0)}.wp-block-a8c-navigation-menu .footer-navigation .footer-menu{display:inline;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;font-size:.71111em;padding-left:0}.wp-block-a8c-navigation-menu .footer-navigation .footer-menu li{display:inline;margin-right:1rem}.wp-block-a8c-navigation-menu .footer-navigation .footer-menu a{text-decoration:none;color:#767676}.wp-block-a8c-navigation-menu .footer-navigation .footer-menu a:hover{text-decoration:none;color:#0073aa}.editor-styles-wrapper .wp-block-a8c-navigation-menu-toolbar a,.editor-styles-wrapper .wp-block-a8c-navigation-menu-toolbar a:hover{color:#555d66}.a8c-post-autocomplete{position:relative}.a8c-post-autocomplete .components-spinner{bottom:7px;position:absolute;right:-5px}.a8c-post-autocomplete__suggestions{max-height:200px;overflow-y:auto;width:302px}.a8c-post-autocomplete__suggestions .components-button{display:block;height:auto;min-height:30px;white-space:normal;width:100%;word-wrap:break-word}.post-content-block.alignfull{padding:0 12px}.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}.block-editor .wp-block-a8c-site-description,.block-editor .wp-block-a8c-site-description:focus{display:inline;color:#767676;font-size:1.125em;font-weight:400;letter-spacing:-.01em;margin:0}.block-editor .site-description__save-button{margin-left:auto;display:block}.block-editor .wp-block-a8c-site-title,.block-editor .wp-block-a8c-site-title:focus{display:inline;color:#111;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;font-size:1.125em;font-weight:400;letter-spacing:-.02em;line-height:1.2;margin:0}.template-block{min-height:200px}.template-block:hover .template-block__overlay{display:flex}.template-block.alignfull{padding:0 12px}.template-block__selector{width:300px}.template-block__selector a{font-family:sans-serif;font-size:13px;padding-left:8px}.template-block__content{pointer-events:none}.template-block__content:after{content:"";clear:both;display:table}.template-block__overlay{display:none;position:absolute;top:0;left:0;width:100%;height:100%}.wp-block-a8c-site-logo{pointer-events:none}
full-site-editing/dist/full-site-editing.deps.json CHANGED
@@ -1 +1 @@
1
- ["lodash","wp-api-fetch","wp-block-editor","wp-blocks","wp-components","wp-compose","wp-data","wp-dom-ready","wp-edit-post","wp-editor","wp-element","wp-i18n","wp-plugins","wp-url"]
1
+ ["lodash","wp-api-fetch","wp-blocks","wp-components","wp-compose","wp-data","wp-dom-ready","wp-edit-post","wp-editor","wp-element","wp-i18n","wp-plugins","wp-url"]
full-site-editing/dist/full-site-editing.js CHANGED
@@ -1,4 +1,4 @@
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 i=t[o]={i:o,l:!1,exports:{}};return e[o].call(i.exports,i,i.exports,n),i.l=!0,i.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 i in e)n.d(o,i,function(t){return e[t]}.bind(null,i));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=42)}([function(e,t){e.exports=wp.element},function(e,t){e.exports=wp.i18n},function(e,t){e.exports=wp.components},function(e,t){e.exports=lodash},function(e,t){e.exports=wp.compose},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t){e.exports=wp.data},function(e,t){e.exports=wp.blocks},function(e,t){e.exports=wp.editor},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t){e.exports=wp.url},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}e.exports=function(e,t,o){return t&&n(e.prototype,t),o&&n(e,o),e}},function(e,t,n){var o=n(35),i=n(9);e.exports=function(e,t){return!t||"object"!==o(t)&&"function"!=typeof t?i(e):t}},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},function(e,t,n){var o=n(36);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&o(e,t)}},function(e,t,n){var o;
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 i(){for(var e=[],t=0;t<arguments.length;t++){var o=arguments[t];if(o){var r=typeof o;if("string"===r||"number"===r)e.push(o);else if(Array.isArray(o)&&o.length){var c=i.apply(null,o);c&&e.push(c)}else if("object"===r)for(var a in o)n.call(o,a)&&o[a]&&e.push(a)}}return e.join(" ")}e.exports?(i.default=i,e.exports=i):void 0===(o=function(){return i}.apply(t,[]))||(e.exports=o)}()},function(e,t){e.exports=wp.blockEditor},function(e,t){e.exports=wp.apiFetch},function(e,t){e.exports=wp.domReady},function(e,t){e.exports=wp.editPost},function(e,t,n){},function(e,t,n){var o=n(28),i=n(29),r=n(30);e.exports=function(e,t){return o(e)||i(e,t)||r()}},function(e,t,n){var o=n(5);e.exports=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){o(e,t,n[t])})}return e}},function(e,t){function n(e,t,n,o,i,r,c){try{var a=e[r](c),l=a.value}catch(s){return void n(s)}a.done?t(l):Promise.resolve(l).then(o,i)}e.exports=function(e){return function(){var t=this,o=arguments;return new Promise(function(i,r){var c=e.apply(t,o);function a(e){n(c,i,r,a,l,"next",e)}function l(e){n(c,i,r,a,l,"throw",e)}a(void 0)})}}},function(e,t){e.exports=wp.plugins},function(e,t,n){},,function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){var n=[],o=!0,i=!1,r=void 0;try{for(var c,a=e[Symbol.iterator]();!(o=(c=a.next()).done)&&(n.push(c.value),!t||n.length!==t);o=!0);}catch(l){i=!0,r=l}finally{try{o||null==a.return||a.return()}finally{if(i)throw r}}return n}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}},function(e,t,n){},,function(e,t,n){},,function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(t){return"function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?e.exports=o=function(e){return n(e)}:e.exports=o=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":n(e)},o(t)}e.exports=o},function(e,t){function n(t,o){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,o)}e.exports=n},function(e,t,n){},,,function(e,t,n){},,function(e,t,n){"use strict";n.r(t);var o=n(0),i=n(7),r=n(1),c=n(2),a=n(8),l=n(10),s=function(e){var t=e.attributes,n=Object(l.addQueryArgs)("customize.php",{"autofocus[panel]":"nav_menus",return:window.location.href});return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(a.BlockControls,null,Object(o.createElement)(c.Toolbar,{className:"wp-block-a8c-navigation-menu-toolbar"},Object(o.createElement)(c.IconButton,{icon:"edit",label:Object(r.__)("Edit Menu"),href:n,className:"components-toolbar__control"}))),Object(o.createElement)(c.ServerSideRender,{attributes:t,block:"a8c/navigation-menu",className:"wp-block-a8c-navigation-menu"}))},u=(n(26),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(i.registerBlockType)("a8c/navigation-menu",{title:Object(r.__)("Navigation Menu"),description:Object(r.__)("Visual placeholder for site-wide navigation and menus."),icon:u,category:"layout",supports:{html:!1,multiple:!1,reusable:!1},attributes:{themeLocation:{type:"string",default:"main-1"}},edit:s,save:function(){return null}});var p=n(17),b=n(5),d=n.n(b),f=n(16),m=n.n(f),g=n(3),O=n(4),h=n(6),j=n(22),y=n.n(j),v=n(23),_=n.n(v),S=n(24),E=n.n(S),w=n(18),P=n.n(w),x=(n(31),Object(g.debounce)(function(){var e=E()(regeneratorRuntime.mark(function e(t,n,o){var i;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o({loading:!0,showSuggestions:!0,suggestions:[]}),e.next=3,P()({path:Object(l.addQueryArgs)("/wp/v2/search",_()({context:"embed",per_page:20,search:t},!!n&&{subtype:n}))});case 3:i=e.sent,o({loading:!1,showSuggestions:!0,suggestions:i});case 5:case"end":return e.stop()}},e)}));return function(t,n,o){return e.apply(this,arguments)}}(),200)),k=Object(O.withState)({loading:!1,showSuggestions:!1,suggestions:[]})(function(e){var t=e.initialValue,n=e.loading,i=e.onSelectPost,a=e.postType,l=e.setState,s=e.showSuggestions,u=e.suggestions,p=Object(o.useState)(t),b=y()(p,2),d=b[0],f=b[1],m=function(e){return function(){var t=function(e,t,n){var o=e.id,i=e.title,r=e.subtype;return t({loading:!1,showSuggestions:!1,suggestions:[]}),n(i),{id:o,type:r}}(e,l,f);i(t)}};return Object(o.createElement)("div",{className:"a8c-post-autocomplete"},Object(o.createElement)(c.TextControl,{autoComplete:"off",onChange:function(e){f(e),e.length<2?l({loading:!1,showSuggestions:!1}):x(e,a,l)},placeholder:Object(r.__)("Type to search"),type:"search",value:d}),n&&Object(o.createElement)(c.Spinner,null),s&&!!u.length&&Object(o.createElement)(c.Popover,{focusOnMount:!1,noArrow:!0,position:"bottom"},Object(o.createElement)("div",{className:"a8c-post-autocomplete__suggestions"},Object(g.map)(u,function(e){return Object(o.createElement)(c.Button,{isLarge:!0,isLink:!0,key:e.id,onClick:m(e)},e.title)}))))}),T=Object(O.compose)(Object(O.withState)({isEditing:!1,selectedPostId:void 0,selectedPostType:void 0}),Object(h.withSelect)(function(e,t){var n=t.selectedPostId,o=t.selectedPostType;return{selectedPost:(0,e("core").getEntityRecord)("postType",o,n)}}))(function(e){var t=e.attributes,n=e.isEditing,i=e.selectedPost,l=e.setState,s=t.align,u=!n||!!i,p=n||!i,b=!n&&!!i;return Object(o.createElement)(o.Fragment,null,u&&Object(o.createElement)(a.BlockControls,null,Object(o.createElement)(c.Toolbar,null,Object(o.createElement)(c.IconButton,{className:m()("components-icon-button components-toolbar__control",{"is-active":n}),label:Object(r.__)("Change Preview"),onClick:function(){return l({isEditing:!n})},icon:"edit"}))),Object(o.createElement)("div",{className:m()("post-content-block",d()({},"align".concat(s),s))},p&&Object(o.createElement)(c.Placeholder,{icon:"layout",label:Object(r.__)("Content Slot"),instructions:Object(r.__)("Placeholder for a post or a page.")},Object(o.createElement)("div",{className:"post-content-block__selector"},Object(o.createElement)("div",null,Object(r.__)("Select something to preview:")),Object(o.createElement)(k,{initialValue:Object(g.get)(i,["title","rendered"]),onSelectPost:function(e){var t=e.id,n=e.type;l({isEditing:!1,selectedPostId:t,selectedPostType:n})},postType:["page","post"]}),!!i&&Object(o.createElement)("a",{href:"?post=".concat(i.id,"&action=edit")},Object(r.sprintf)(Object(r.__)('Edit "%s"'),Object(g.get)(i,["title","rendered"],""))))),b&&Object(o.createElement)(o.RawHTML,{className:"post-content-block__preview"},Object(g.get)(i,["content","rendered"]))))}),C=(n(33),"wp_template"===fullSiteEditing.editorPostType);Object(i.registerBlockType)("a8c/post-content",{title:Object(r.__)("Content Slot"),description:Object(r.__)("Placeholder for a post or a page."),icon:"layout",category:"layout",supports:{align:["wide","full"],anchor:!0,html:!1,multiple:!1,reusable:!1},edit:C?T:function(){return Object(o.createElement)(p.InnerBlocks,null)},save:C?function(){return null}:function(){return Object(o.createElement)(p.InnerBlocks.Content,null)}});var B=n(11),N=n.n(B),I=n(12),R=n.n(I),D=n(13),L=n.n(D),M=n(14),A=n.n(M),U=n(9),F=n.n(U),z=n(15),V=n.n(z),H=function(e){function t(){var e,n;N()(this,t);for(var o=arguments.length,i=new Array(o),c=0;c<o;c++)i[c]=arguments[c];return n=L()(this,(e=A()(t)).call.apply(e,[this].concat(i))),d()(F()(n),"state",{description:Object(r.__)("Site description loading…"),initialDescription:""}),d()(F()(n),"revertDescription",function(){return n.setState({description:n.state.initialDescription})}),d()(F()(n),"updateInitialDescription",function(){return n.setState({initialDescription:n.state.description})}),n}return V()(t,e),R()(t,[{key:"componentDidMount",value:function(){var e=this,t=this.props.noticeOperations;return P()({path:"/wp/v2/settings"}).then(function(t){var n=t.description;return e.setState({initialDescription:n,description:n})}).catch(function(e){var n=e.message;t.createErrorNotice(n)})}},{key:"componentDidUpdate",value:function(e){var t=this,n=this.state,o=n.description,i=n.initialDescription,r=this.props,c=r.shouldUpdateSiteOption,a=r.noticeOperations,l=r.isSelected,s=o&&o.trim()===i.trim(),u=!o||0===o.trim().length;!l&&e.isSelected&&u&&this.revertDescription(),c&&!s&&!e.shouldUpdateSiteOption&&c&&P()({path:"/wp/v2/settings",method:"POST",data:{description:o}}).then(function(){return t.updateInitialDescription()}).catch(function(e){var n=e.message;a.createErrorNotice(n),t.revertDescription()})}},{key:"render",value:function(){var e=this,t=this.props,n=t.className,i=t.noticeUI,c=this.state.description;return Object(o.createElement)(o.Fragment,null,i,Object(o.createElement)(p.PlainText,{className:n,value:c,onChange:function(t){return e.setState({description:t})},placeholder:Object(r.__)("Site Description"),"aria-label":Object(r.__)("Site Description")}))}}]),t}(o.Component),Q=Object(O.compose)([Object(h.withSelect)(function(e){var t=e("core/editor"),n=t.isSavingPost,o=t.isPublishingPost,i=t.isAutosavingPost,r=t.isCurrentPostPublished;return{shouldUpdateSiteOption:(n()&&r()||o())&&!i()}}),c.withNotices])(H);n(37);Object(i.registerBlockType)("a8c/site-description",{title:Object(r.__)("Site Description2"),description:Object(r.__)("Site description, also known as the tagline."),icon:"layout",category:"layout",supports:{html:!1,multiple:!1,reusable:!1},edit:Q,save:function(){return null}});n(21);var q=Object(O.compose)(Object(h.withSelect)(function(e,t){var n=t.attributes,o=e("core").getEntityRecord,i=e("core/editor").getCurrentPostId,r=n.templateId;return{currentPostId:i(),template:r&&o("postType","wp_template_part",r)}}),Object(O.withState)({isEditing:!1}))(function(e){var t=e.attributes,n=e.currentPostId,i=e.isEditing,l=e.template,s=e.setAttributes,u=e.setState,p=t.align,b=t.templateId,f=!i||!!b,O=i||!b,h=!i&&!!b,j="wp_template"===fullSiteEditing.editorPostType;return Object(o.createElement)(o.Fragment,null,f&&j&&Object(o.createElement)(a.BlockControls,null,Object(o.createElement)(c.Toolbar,null,Object(o.createElement)(c.IconButton,{className:m()("components-icon-button components-toolbar__control",{"is-active":i}),label:Object(r.__)("Change Template Part"),onClick:function(){return u({isEditing:!i})},icon:"edit"}))),Object(o.createElement)("div",{className:m()("template-block",d()({},"align".concat(p),p))},O&&Object(o.createElement)(c.Placeholder,{icon:"layout",label:Object(r.__)("Template Part"),instructions:Object(r.__)("Select a template part to display")},Object(o.createElement)("div",{className:"template-block__selector"},Object(o.createElement)(k,{initialValue:Object(g.get)(l,["title","rendered"]),onSelectPost:function(e){var t=e.id;u({isEditing:!1}),s({templateId:t})},postType:"wp_template_part"}),!!l&&Object(o.createElement)("a",{href:"?post=".concat(b,"&action=edit&fse_parent_post=").concat(n)},Object(r.sprintf)(Object(r.__)('Edit "%s"'),Object(g.get)(l,["title","rendered"],""))))),h&&Object(o.createElement)(o.Fragment,null,Object(o.createElement)(o.RawHTML,{className:"template-block__content"},Object(g.get)(l,["content","rendered"])),!j&&Object(o.createElement)(c.Placeholder,{className:"template-block__overlay",instructions:Object(r.__)("This block is part of your site template and may appear on multiple pages.")},Object(o.createElement)(c.Button,{href:"?post=".concat(b,"&action=edit&fse_parent_post=").concat(n),isDefault:!0},Object(r.sprintf)(Object(r.__)("Edit %s"),Object(g.get)(l,["title","rendered"],"")))))))});"wp_template_part"!==fullSiteEditing.editorPostType&&Object(i.registerBlockType)("a8c/template",{title:Object(r.__)("Template Part"),description:Object(r.__)("Display a template part."),icon:"layout",category:"layout",attributes:{templateId:{type:"number"}},supports:{align:["wide","full"],anchor:!0,html:!1,reusable:!1},edit:q,save:function(){return null}});var G=function(e){var t=e.className;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(a.BlockControls,null,Object(o.createElement)(c.Toolbar,null,Object(o.createElement)(c.IconButton,{className:"components-toolbar__control",icon:"edit",label:Object(r.__)("Edit Site Logo"),onClick:function(){var e=Object(l.addQueryArgs)("customize.php",{"autofocus[section]":"title_tagline",return:window.location.href});window.location.href=e}}))),Object(o.createElement)(c.ServerSideRender,{className:t,block:"a8c/site-logo",attributes:{editorPreview:!0}}))};n(40);Object(i.registerBlockType)("a8c/site-logo",{title:Object(r.__)("Site Logo"),description:Object(r.__)("Site Logo"),icon:"format-image",category:"layout",keywords:[Object(r.__)("logo"),Object(r.__)("icon"),Object(r.__)("site")],edit:G,save:function(){return null}});var J=n(20),K=n(25),W=Object(O.compose)(Object(h.withDispatch)(function(e){return{setTemplateId:function(t){return e("core/editor").editPost({meta:{_wp_template_id:t}})}}}),Object(h.withSelect)(function(e){var t=e("core"),n=t.canUser,o=t.getEntityRecord,i=Object(g.get)(e("core/editor").getEditedPostAttribute("meta"),"_wp_template_id");return{canUserUpdateSettings:n("update","settings"),selectedTemplate:i&&o("postType","wp_template",i)}}))(function(e){var t=e.canUserUpdateSettings,n=e.setTemplateId,i=e.selectedTemplate;if(!t)return null;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(J.PluginSidebarMoreMenuItem,{target:"fse-template-sidebar",icon:"layout"},Object(r.__)("Template")),Object(o.createElement)(J.PluginSidebar,{icon:"layout",name:"fse-template-sidebar",title:Object(r.__)("Template")},Object(o.createElement)(c.PanelBody,null,Object(r.__)("Select a template"),Object(o.createElement)(k,{initialValue:Object(g.get)(i,["title","rendered"]),onSelectPost:function(e){var t=e.id;n(parseInt(t,10))},postType:"wp_template"}))))});"page"===fullSiteEditing.editorPostType&&Object(K.registerPlugin)("fse-template-selector-sidebar",{render:W});var X=n(19),Y=n.n(X);Y()(function(){if("wp_template_part"===fullSiteEditing.editorPostType&&fullSiteEditing.closeButtonUrl){var e=document.querySelector(".edit-post-fullscreen-mode-close__toolbar a");e&&(e.href=fullSiteEditing.closeButtonUrl)}});var Z=function(e){function t(){return N()(this,t),L()(this,A()(t).apply(this,arguments))}return V()(t,e),R()(t,[{key:"render",value:function(){var e=this.props,t=e.onSave,n=e.onClose,i=e.isBusy,a=e.disabled;return Object(o.createElement)("div",{className:"edit-post-layout"},Object(o.createElement)("div",{className:"editor-post-publish-panel"},Object(o.createElement)("div",{className:"editor-post-publish-panel__header"},Object(o.createElement)("div",{className:"editor-post-publish-panel__header-publish-button"},Object(o.createElement)(c.Button,{isPrimary:!0,isLarge:!0,isBusy:i,onClick:t,disabled:a},Object(r.__)("Publish")),Object(o.createElement)("span",{className:"editor-post-publish-panel__spacer"})),Object(o.createElement)(c.IconButton,{"aria-expanded":!0,onClick:n,icon:"no-alt",label:Object(r.__)("Close panel")})),Object(o.createElement)("div",{className:"editor-post-publish-panel__prepublish"},Object(o.createElement)("p",null,Object(o.createElement)("strong",null,Object(r.__)("Are you ready to publish?"))),Object(o.createElement)("p",null,Object(r.__)("Changes you publish will update all pages with this template part.")))))}}]),t}(o.Component),$={buttonStyle:{visibility:"hidden"},isPanelOpen:!1},ee=function(e){function t(e){var n;return N()(this,t),n=L()(this,A()(t).call(this,e)),d()(F()(n),"onPublish",function(){n.togglePanel(),n.getOriginalButton().click()}),d()(F()(n),"togglePanel",function(){n.setState({isPanelOpen:!n.state.isPanelOpen})}),n.onResize=Object(g.debounce)(n.onResize,100),n.state=$,n.onResize(),n}return V()(t,e),R()(t,[{key:"componentDidUpdate",value:function(e,t){var n=this;e.isFullScreen!==t.isFullScreen&&setTimeout(function(){return n.onResize()},1)}},{key:"getOriginalButton",value:function(){return document.querySelector(".edit-post-header .editor-post-publish-button")}},{key:"onResize",value:function(){var e=this.getOriginalButton(),t=$.buttonStyle;if(Object(g.isNil)(e)||!("getBoundingClientRect"in e))return this.setState({buttonStyle:t});var n=e.getBoundingClientRect();t={height:"33px",position:"fixed",zIndex:"10001",top:n.top,left:n.x},window.matchMedia("(min-width: 600px)").matches||(t.paddingLeft="5px",t.paddingRight="5px"),this.setState({buttonStyle:t})}},{key:"getHidingCss",value:function(){return".edit-post-header .editor-post-publish-button {\n\t\t\tvisibility: hidden !important;\n\t\t}"}},{key:"render",value:function(){if(!this.shouldRender())return null;var e=this.props,t=e.isSaving,n=e.isSaveable,i=e.isPostSavingLocked,a=e.isPublishable,l=t||!n||i||!a;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(c.Button,{onClick:this.togglePanel,isPrimary:!0,isLarge:!0,style:this.state.buttonStyle,disabled:l,isBusy:this.isSaving},Object(r.__)("Update")),this.state.isPanelOpen&&Object(o.createElement)(Z,{isBusy:this.isSaving,onClose:this.togglePanel,onSave:this.onPublish,disabled:l}),Object(o.createElement)("style",null,this.getHidingCss()))}},{key:"shouldRender",value:function(){var e=this.props,t=e.isPublished,n=e.isPublishable,o=e.isSaveable;return!!(t&&n&&o)}}]),t}(o.Component),te=Object(O.compose)([Object(h.withSelect)(function(e){var t=e("core/editor"),n=t.isSavingPost,o=t.isCurrentPostPublished,i=t.isEditedPostSaveable,r=t.isEditedPostPublishable,c=t.isPostSavingLocked,a=t.getCurrentPost;return{isSaving:n(),isSaveable:i(),isPostSavingLocked:c(),isPublishable:r(),isPublished:o(),hasPublishAction:Object(g.get)(a(),["_links","wp:action-publish"],!1),isFullScreen:e("core/edit-post").isFeatureActive("fullscreenMode")}}),Object(O.withGlobalEvents)({resize:"onResize"})])(ee);Y()(function(){if("wp_template_part"===fullSiteEditing.editorPostType){var e=document.createElement("div");e.id="template-update-confirmation",document.getElementById("wpcontent").appendChild(e),Object(o.render)(Object(o.createElement)(te,null),e)}})}]));
1
+ !function(e,t){for(var n in t)e[n]=t[n]}(window,function(e){var t={};function n(i){if(t[i])return t[i].exports;var o=t[i]={i:i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},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 i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(i,o,function(t){return e[t]}.bind(null,o));return i},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=43)}([function(e,t){e.exports=wp.element},function(e,t){e.exports=wp.i18n},function(e,t){e.exports=wp.components},function(e,t){e.exports=lodash},function(e,t){e.exports=wp.compose},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t){e.exports=wp.editor},function(e,t){e.exports=wp.data},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t){e.exports=wp.blocks},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}e.exports=function(e,t,i){return t&&n(e.prototype,t),i&&n(e,i),e}},function(e,t,n){var i=n(34),o=n(8);e.exports=function(e,t){return!t||"object"!==i(t)&&"function"!=typeof t?o(e):t}},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},function(e,t,n){var i=n(35);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t)}},function(e,t,n){var i;
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 o(){for(var e=[],t=0;t<arguments.length;t++){var i=arguments[t];if(i){var r=typeof i;if("string"===r||"number"===r)e.push(i);else if(Array.isArray(i)&&i.length){var c=o.apply(null,i);c&&e.push(c)}else if("object"===r)for(var a in i)n.call(i,a)&&i[a]&&e.push(a)}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(i=function(){return o}.apply(t,[]))||(e.exports=i)}()},function(e,t){e.exports=wp.apiFetch},function(e,t){e.exports=wp.url},function(e,t){e.exports=wp.domReady},function(e,t){e.exports=wp.editPost},function(e,t,n){},function(e,t,n){var i=n(27),o=n(28),r=n(29);e.exports=function(e,t){return i(e)||o(e,t)||r()}},function(e,t,n){var i=n(5);e.exports=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),o.forEach(function(t){i(e,t,n[t])})}return e}},function(e,t){function n(e,t,n,i,o,r,c){try{var a=e[r](c),l=a.value}catch(s){return void n(s)}a.done?t(l):Promise.resolve(l).then(i,o)}e.exports=function(e){return function(){var t=this,i=arguments;return new Promise(function(o,r){var c=e.apply(t,i);function a(e){n(c,o,r,a,l,"next",e)}function l(e){n(c,o,r,a,l,"throw",e)}a(void 0)})}}},function(e,t){e.exports=wp.plugins},function(e,t,n){},,function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){var n=[],i=!0,o=!1,r=void 0;try{for(var c,a=e[Symbol.iterator]();!(i=(c=a.next()).done)&&(n.push(c.value),!t||n.length!==t);i=!0);}catch(l){o=!0,r=l}finally{try{i||null==a.return||a.return()}finally{if(o)throw r}}return n}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}},function(e,t,n){},,function(e,t,n){},,function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(t){return"function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?e.exports=i=function(e){return n(e)}:e.exports=i=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":n(e)},i(t)}e.exports=i},function(e,t){function n(t,i){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,i)}e.exports=n},function(e,t,n){},,function(e,t,n){},,,function(e,t,n){},,function(e,t,n){"use strict";n.r(t);var i=n(0),o=n(9),r=n(1),c=n(2),a=n(6),l=n(17),s=function(e){var t=e.attributes,n=Object(l.addQueryArgs)("customize.php",{"autofocus[panel]":"nav_menus",return:window.location.href});return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(a.BlockControls,null,Object(i.createElement)(c.Toolbar,{className:"wp-block-a8c-navigation-menu-toolbar"},Object(i.createElement)(c.IconButton,{icon:"edit",label:Object(r.__)("Edit Menu"),href:n,className:"components-toolbar__control"}))),Object(i.createElement)(c.ServerSideRender,{attributes:t,block:"a8c/navigation-menu",className:"wp-block-a8c-navigation-menu"}))},u=(n(25),Object(i.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(i.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(i.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(r.__)("Navigation Menu"),description:Object(r.__)("Visual placeholder for site-wide navigation and menus."),icon:u,category:"layout",supports:{html:!1,multiple:!1,reusable:!1},attributes:{themeLocation:{type:"string",default:"main-1"}},edit:s,save:function(){return null}});var p=n(5),d=n.n(p),b=n(15),f=n.n(b),m=n(3),g=n(4),h=n(7),O=n(21),v=n.n(O),y=n(22),j=n.n(y),_=n(23),S=n.n(_),E=n(16),w=n.n(E),P=(n(30),Object(m.debounce)(function(){var e=S()(regeneratorRuntime.mark(function e(t,n,i){var o;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return i({loading:!0,showSuggestions:!0,suggestions:[]}),e.next=3,w()({path:Object(l.addQueryArgs)("/wp/v2/search",j()({context:"embed",per_page:20,search:t},!!n&&{subtype:n}))});case 3:o=e.sent,i({loading:!1,showSuggestions:!0,suggestions:o});case 5:case"end":return e.stop()}},e)}));return function(t,n,i){return e.apply(this,arguments)}}(),200)),T=Object(g.withState)({loading:!1,showSuggestions:!1,suggestions:[]})(function(e){var t=e.initialValue,n=e.loading,o=e.onSelectPost,a=e.postType,l=e.setState,s=e.showSuggestions,u=e.suggestions,p=Object(i.useState)(t),d=v()(p,2),b=d[0],f=d[1],g=function(e){return function(){var t=function(e,t,n){var i=e.id,o=e.title,r=e.subtype;return t({loading:!1,showSuggestions:!1,suggestions:[]}),n(o),{id:i,type:r}}(e,l,f);o(t)}};return Object(i.createElement)("div",{className:"a8c-post-autocomplete"},Object(i.createElement)(c.TextControl,{autoComplete:"off",onChange:function(e){f(e),e.length<2?l({loading:!1,showSuggestions:!1}):P(e,a,l)},placeholder:Object(r.__)("Type to search"),type:"search",value:b}),n&&Object(i.createElement)(c.Spinner,null),s&&!!u.length&&Object(i.createElement)(c.Popover,{focusOnMount:!1,noArrow:!0,position:"bottom"},Object(i.createElement)("div",{className:"a8c-post-autocomplete__suggestions"},Object(m.map)(u,function(e){return Object(i.createElement)(c.Button,{isLarge:!0,isLink:!0,key:e.id,onClick:g(e)},e.title)}))))}),k=Object(g.compose)(Object(g.withState)({isEditing:!1,selectedPostId:void 0,selectedPostType:void 0}),Object(h.withSelect)(function(e,t){var n=t.selectedPostId,i=t.selectedPostType;return{selectedPost:(0,e("core").getEntityRecord)("postType",i,n)}}))(function(e){var t=e.attributes,n=e.isEditing,o=e.selectedPost,l=e.setState,s=t.align,u=!n||!!o,p=n||!o,b=!n&&!!o;return Object(i.createElement)(i.Fragment,null,u&&Object(i.createElement)(a.BlockControls,null,Object(i.createElement)(c.Toolbar,null,Object(i.createElement)(c.IconButton,{className:f()("components-icon-button components-toolbar__control",{"is-active":n}),label:Object(r.__)("Change Preview"),onClick:function(){return l({isEditing:!n})},icon:"edit"}))),Object(i.createElement)("div",{className:f()("post-content-block",d()({},"align".concat(s),s))},p&&Object(i.createElement)(c.Placeholder,{icon:"layout",label:Object(r.__)("Content Slot"),instructions:Object(r.__)("Placeholder for a post or a page.")},Object(i.createElement)("div",{className:"post-content-block__selector"},Object(i.createElement)("div",null,Object(r.__)("Select something to preview:")),Object(i.createElement)(T,{initialValue:Object(m.get)(o,["title","rendered"]),onSelectPost:function(e){var t=e.id,n=e.type;l({isEditing:!1,selectedPostId:t,selectedPostType:n})},postType:["page","post"]}),!!o&&Object(i.createElement)("a",{href:"?post=".concat(o.id,"&action=edit")},Object(r.sprintf)(Object(r.__)('Edit "%s"'),Object(m.get)(o,["title","rendered"],""))))),b&&Object(i.createElement)(i.RawHTML,{className:"post-content-block__preview"},Object(m.get)(o,["content","rendered"]))))}),x=(n(32),"wp_template"===fullSiteEditing.editorPostType);Object(o.registerBlockType)("a8c/post-content",{title:Object(r.__)("Content Slot"),description:Object(r.__)("Placeholder for a post or a page."),icon:"layout",category:"layout",supports:{align:["wide","full"],anchor:!0,html:!1,multiple:!1,reusable:!1},edit:x?k:function(){return Object(i.createElement)(a.InnerBlocks,null)},save:x?function(){return null}:function(){return Object(i.createElement)(a.InnerBlocks.Content,null)}});var C=n(10),B=n.n(C),N=n(11),D=n.n(N),I=n(12),R=n.n(I),L=n(13),U=n.n(L),M=n(8),A=n.n(M),F=n(14),z=n.n(F),V=function(e){function t(){var e,n;B()(this,t);for(var i=arguments.length,o=new Array(i),c=0;c<i;c++)o[c]=arguments[c];return n=R()(this,(e=U()(t)).call.apply(e,[this].concat(o))),d()(A()(n),"state",{description:Object(r.__)("Site description loading…"),initialDescription:"",isDirty:!1,isSaving:!1}),d()(A()(n),"onSave",function(){var e=n.state,t=e.description,i=e.initialDescription;t&&t.trim()===i.trim()?n.setState({isDirty:!1}):n.saveSiteDescription(t)}),d()(A()(n),"revertDescription",function(){return n.setState({description:n.state.initialDescription,isSaving:!1})}),d()(A()(n),"updateInitialDescription",function(){n.setState({initialDescription:n.state.description,isDirty:!1,isSaving:!1})}),n}return z()(t,e),D()(t,[{key:"componentDidMount",value:function(){var e=this,t=this.props.noticeOperations;return w()({path:"/wp/v2/settings"}).then(function(t){var n=t.description;return e.setState({initialDescription:n,description:n})}).catch(function(e){var n=e.message;t.createErrorNotice(n)})}},{key:"componentDidUpdate",value:function(e){var t=this.state,n=t.description,i=t.initialDescription,o=this.props,r=o.shouldUpdateSiteOption,c=o.isSelected,a=n&&n.trim()===i.trim(),l=!n||0===n.trim().length;!c&&e.isSelected&&l&&this.revertDescription(),r&&!a&&!e.shouldUpdateSiteOption&&r&&this.saveSiteDescription(n)}},{key:"saveSiteDescription",value:function(e){var t=this,n=this.props.noticeOperations;this.setState({isSaving:!0}),w()({path:"/wp/v2/settings",method:"POST",data:{description:e}}).then(function(){return t.updateInitialDescription()}).catch(function(e){var i=e.message;n.createErrorNotice(i),t.revertDescription()})}},{key:"render",value:function(){var e=this,t=this.props,n=t.className,o=t.noticeUI,l=this.state,s=l.description,u=l.isDirty,p=l.isSaving;return Object(i.createElement)(i.Fragment,null,o,Object(i.createElement)(a.PlainText,{className:n,value:s,onChange:function(t){return e.setState({description:t,isDirty:!0})},placeholder:Object(r.__)("Site Description"),"aria-label":Object(r.__)("Site Description")}),u&&Object(i.createElement)(c.Button,{ref:this.editButton,isLarge:!0,className:"site-description__save-button",disabled:p,isBusy:p,onClick:this.onSave},Object(r.__)("Save")))}}]),t}(i.Component),H=Object(g.compose)([Object(h.withSelect)(function(e){var t=e("core/editor"),n=t.isSavingPost,i=t.isPublishingPost,o=t.isAutosavingPost,r=t.isCurrentPostPublished;return{shouldUpdateSiteOption:(n()&&r()||i())&&!o()}}),c.withNotices])(V);n(36);Object(o.registerBlockType)("a8c/site-description",{title:Object(r.__)("Site Description"),description:Object(r.__)("Site description, also known as the tagline."),icon:"layout",category:"layout",supports:{html:!1,multiple:!1,reusable:!1},edit:H,save:function(){return null}});var Q=function(e){function t(){var e,n;B()(this,t);for(var i=arguments.length,o=new Array(i),c=0;c<i;c++)o[c]=arguments[c];return n=R()(this,(e=U()(t)).call.apply(e,[this].concat(o))),d()(A()(n),"state",{title:Object(r.__)("Site title loading…"),initialTitle:""}),d()(A()(n),"revertTitle",function(){return n.setState({title:n.state.initialTitle})}),d()(A()(n),"updateInitialTitle",function(){return n.setState({initialTitle:n.state.title})}),n}return z()(t,e),D()(t,[{key:"componentDidMount",value:function(){var e=this,t=this.props.noticeOperations;return w()({path:"/wp/v2/settings"}).then(function(t){var n=t.title;return e.setState({initialTitle:n,title:n})}).catch(function(e){var n=e.message;return t.createErrorNotice(n)})}},{key:"componentDidUpdate",value:function(e){var t=this,n=this.state,i=n.title,o=n.initialTitle,r=this.props,c=r.shouldUpdateSiteOption,a=r.noticeOperations,l=r.isSelected,s=i&&i.trim()===o.trim(),u=!i||0===i.trim().length;!l&&e.isSelected&&u&&this.revertTitle(),c&&!s&&!e.shouldUpdateSiteOption&&c&&w()({path:"/wp/v2/settings",method:"POST",data:{title:i}}).then(function(){return t.updateInitialTitle()}).catch(function(e){var n=e.message;a.createErrorNotice(n),t.revertTitle()})}},{key:"render",value:function(){var e=this,t=this.state.title,n=this.props,o=n.className,c=n.noticeUI;return Object(i.createElement)(i.Fragment,null,c,Object(i.createElement)(a.PlainText,{className:f()("site-title",o),value:t,onChange:function(t){return e.setState({title:t})},placeholder:Object(r.__)("Site Title"),"aria-label":Object(r.__)("Site Title")}))}}]),t}(i.Component),q=Object(g.compose)([Object(h.withSelect)(function(e){var t=e("core/editor"),n=t.isSavingPost,i=t.isPublishingPost,o=t.isAutosavingPost,r=t.isCurrentPostPublished;return{shouldUpdateSiteOption:(n()&&r()||i())&&!o()}}),c.withNotices])(Q);n(38);Object(o.registerBlockType)("a8c/site-title",{title:Object(r.__)("Site Title"),description:Object(r.__)("Your site title."),icon:"layout",category:"layout",supports:{html:!1,multiple:!1,reusable:!1},edit:q,save:function(){return null}});n(20);var G=Object(g.compose)(Object(h.withSelect)(function(e,t){var n=t.attributes,i=e("core").getEntityRecord,o=e("core/editor").getCurrentPostId,r=n.templateId;return{currentPostId:o(),template:r&&i("postType","wp_template_part",r)}}),Object(g.withState)({isEditing:!1}))(function(e){var t=e.attributes,n=e.currentPostId,o=e.isEditing,l=e.template,s=e.setAttributes,u=e.setState,p=t.align,b=t.templateId,g=!o||!!b,h=o||!b,O=!o&&!!b,v="wp_template"===fullSiteEditing.editorPostType;return Object(i.createElement)(i.Fragment,null,g&&v&&Object(i.createElement)(a.BlockControls,null,Object(i.createElement)(c.Toolbar,null,Object(i.createElement)(c.IconButton,{className:f()("components-icon-button components-toolbar__control",{"is-active":o}),label:Object(r.__)("Change Template Part"),onClick:function(){return u({isEditing:!o})},icon:"edit"}))),Object(i.createElement)("div",{className:f()("template-block",d()({},"align".concat(p),p))},h&&Object(i.createElement)(c.Placeholder,{icon:"layout",label:Object(r.__)("Template Part"),instructions:Object(r.__)("Select a template part to display")},Object(i.createElement)("div",{className:"template-block__selector"},Object(i.createElement)(T,{initialValue:Object(m.get)(l,["title","rendered"]),onSelectPost:function(e){var t=e.id;u({isEditing:!1}),s({templateId:t})},postType:"wp_template_part"}),!!l&&Object(i.createElement)("a",{href:"?post=".concat(b,"&action=edit&fse_parent_post=").concat(n)},Object(r.sprintf)(Object(r.__)('Edit "%s"'),Object(m.get)(l,["title","rendered"],""))))),O&&Object(i.createElement)(i.Fragment,null,Object(i.createElement)(i.RawHTML,{className:"template-block__content"},Object(m.get)(l,["content","rendered"])),!v&&Object(i.createElement)(c.Placeholder,{className:"template-block__overlay",instructions:Object(r.__)("This block is part of your site template and may appear on multiple pages.")},Object(i.createElement)(c.Button,{href:"?post=".concat(b,"&action=edit&fse_parent_post=").concat(n),isDefault:!0},Object(r.sprintf)(Object(r.__)("Edit %s"),Object(m.get)(l,["title","rendered"],"")))))))});"wp_template_part"!==fullSiteEditing.editorPostType&&Object(o.registerBlockType)("a8c/template",{title:Object(r.__)("Template Part"),description:Object(r.__)("Display a template part."),icon:"layout",category:"layout",attributes:{templateId:{type:"number"}},supports:{align:["wide","full"],anchor:!0,html:!1,reusable:!1},edit:G,save:function(){return null}});var Y=function(e){var t=e.className;return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(a.BlockControls,null,Object(i.createElement)(c.Toolbar,null,Object(i.createElement)(c.IconButton,{className:"components-toolbar__control",icon:"edit",label:Object(r.__)("Edit Site Logo"),onClick:function(){var e=Object(l.addQueryArgs)("customize.php",{"autofocus[section]":"title_tagline",return:window.location.href});window.location.href=e}}))),Object(i.createElement)(c.ServerSideRender,{className:t,block:"a8c/site-logo",attributes:{editorPreview:!0}}))};n(41);Object(o.registerBlockType)("a8c/site-logo",{title:Object(r.__)("Site Logo"),description:Object(r.__)("Site Logo"),icon:"format-image",category:"layout",keywords:[Object(r.__)("logo"),Object(r.__)("icon"),Object(r.__)("site")],edit:Y,save:function(){return null}});var J=n(19),K=n(24),W=Object(g.compose)(Object(h.withDispatch)(function(e){return{setTemplateId:function(t){return e("core/editor").editPost({meta:{_wp_template_id:t}})}}}),Object(h.withSelect)(function(e){var t=e("core"),n=t.canUser,i=t.getEntityRecord,o=Object(m.get)(e("core/editor").getEditedPostAttribute("meta"),"_wp_template_id");return{canUserUpdateSettings:n("update","settings"),selectedTemplate:o&&i("postType","wp_template",o)}}))(function(e){var t=e.canUserUpdateSettings,n=e.setTemplateId,o=e.selectedTemplate;if(!t)return null;return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(J.PluginSidebarMoreMenuItem,{target:"fse-template-sidebar",icon:"layout"},Object(r.__)("Template")),Object(i.createElement)(J.PluginSidebar,{icon:"layout",name:"fse-template-sidebar",title:Object(r.__)("Template")},Object(i.createElement)(c.PanelBody,null,Object(r.__)("Select a template"),Object(i.createElement)(T,{initialValue:Object(m.get)(o,["title","rendered"]),onSelectPost:function(e){var t=e.id;n(parseInt(t,10))},postType:"wp_template"}))))});"page"===fullSiteEditing.editorPostType&&Object(K.registerPlugin)("fse-template-selector-sidebar",{render:W});var X=n(18),Z=n.n(X);Z()(function(){if("wp_template_part"===fullSiteEditing.editorPostType&&fullSiteEditing.closeButtonUrl){var e=document.querySelector(".edit-post-fullscreen-mode-close__toolbar a");e&&(e.href=fullSiteEditing.closeButtonUrl)}});var $=function(e){function t(){return B()(this,t),R()(this,U()(t).apply(this,arguments))}return z()(t,e),D()(t,[{key:"render",value:function(){var e=this.props,t=e.onSave,n=e.onClose,o=e.isBusy,a=e.disabled;return Object(i.createElement)("div",{className:"edit-post-layout"},Object(i.createElement)("div",{className:"editor-post-publish-panel"},Object(i.createElement)("div",{className:"editor-post-publish-panel__header"},Object(i.createElement)("div",{className:"editor-post-publish-panel__header-publish-button"},Object(i.createElement)(c.Button,{isPrimary:!0,isLarge:!0,isBusy:o,onClick:t,disabled:a},Object(r.__)("Publish")),Object(i.createElement)("span",{className:"editor-post-publish-panel__spacer"})),Object(i.createElement)(c.IconButton,{"aria-expanded":!0,onClick:n,icon:"no-alt",label:Object(r.__)("Close panel")})),Object(i.createElement)("div",{className:"editor-post-publish-panel__prepublish"},Object(i.createElement)("p",null,Object(i.createElement)("strong",null,Object(r.__)("Are you ready to publish?"))),Object(i.createElement)("p",null,Object(r.__)("Changes you publish will update all pages with this template part.")))))}}]),t}(i.Component),ee={buttonStyle:{visibility:"hidden"},isPanelOpen:!1},te=function(e){function t(e){var n;return B()(this,t),n=R()(this,U()(t).call(this,e)),d()(A()(n),"onPublish",function(){n.togglePanel(),n.getOriginalButton().click()}),d()(A()(n),"togglePanel",function(){n.setState({isPanelOpen:!n.state.isPanelOpen})}),n.onResize=Object(m.debounce)(n.onResize,100),n.state=ee,n.onResize(),n}return z()(t,e),D()(t,[{key:"componentDidUpdate",value:function(e,t){var n=this;e.isFullScreen!==t.isFullScreen&&setTimeout(function(){return n.onResize()},1)}},{key:"getOriginalButton",value:function(){return document.querySelector(".edit-post-header .editor-post-publish-button")}},{key:"onResize",value:function(){var e=this.getOriginalButton(),t=ee.buttonStyle;if(Object(m.isNil)(e)||!("getBoundingClientRect"in e))return this.setState({buttonStyle:t});var n=e.getBoundingClientRect();t={height:"33px",position:"fixed",zIndex:"10001",top:n.top,left:n.x},window.matchMedia("(min-width: 600px)").matches||(t.paddingLeft="5px",t.paddingRight="5px"),this.setState({buttonStyle:t})}},{key:"getHidingCss",value:function(){return".edit-post-header .editor-post-publish-button {\n\t\t\tvisibility: hidden !important;\n\t\t}"}},{key:"render",value:function(){if(!this.shouldRender())return null;var e=this.props,t=e.isSaving,n=e.isSaveable,o=e.isPostSavingLocked,a=e.isPublishable,l=t||!n||o||!a;return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(c.Button,{onClick:this.togglePanel,isPrimary:!0,isLarge:!0,style:this.state.buttonStyle,disabled:l,isBusy:this.isSaving},Object(r.__)("Update")),this.state.isPanelOpen&&Object(i.createElement)($,{isBusy:this.isSaving,onClose:this.togglePanel,onSave:this.onPublish,disabled:l}),Object(i.createElement)("style",null,this.getHidingCss()))}},{key:"shouldRender",value:function(){var e=this.props,t=e.isPublished,n=e.isPublishable,i=e.isSaveable;return!!(t&&n&&i)}}]),t}(i.Component),ne=Object(g.compose)([Object(h.withSelect)(function(e){var t=e("core/editor"),n=t.isSavingPost,i=t.isCurrentPostPublished,o=t.isEditedPostSaveable,r=t.isEditedPostPublishable,c=t.isPostSavingLocked,a=t.getCurrentPost;return{isSaving:n(),isSaveable:o(),isPostSavingLocked:c(),isPublishable:r(),isPublished:i(),hasPublishAction:Object(m.get)(a(),["_links","wp:action-publish"],!1),isFullScreen:e("core/edit-post").isFeatureActive("fullscreenMode")}}),Object(g.withGlobalEvents)({resize:"onResize"})])(te);Z()(function(){if("wp_template_part"===fullSiteEditing.editorPostType){var e=document.createElement("div");e.id="template-update-confirmation",document.getElementById("wpcontent").appendChild(e),Object(i.render)(Object(i.createElement)(ne,null),e)}})}]));
full-site-editing/dist/full-site-editing.rtl.css CHANGED
@@ -1 +1 @@
1
- .wp-block-a8c-navigation-menu .main-navigation{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;font-size:1.125em;font-weight:700;letter-spacing:-.02em;line-height:1.2;pointer-events:none;-webkit-font-smoothing:antialiased}.wp-block-a8c-navigation-menu .main-navigation .main-menu{display:inline-block;margin:0;padding:0}.wp-block-a8c-navigation-menu .main-navigation .main-menu>li{color:#0073aa;display:inline;position:relative}.wp-block-a8c-navigation-menu .main-navigation .main-menu>li>a{font-weight:700;color:#0073aa;margin-left:.5rem}.main-navigation .main-menu>li:last-child.menu-item-has-children .submenu-expand,.wp-block-a8c-navigation-menu .main-navigation .main-menu>li:last-child>a{margin-left:0}.wp-block-a8c-navigation-menu .main-navigation .main-menu>li.menu-item-has-children>a{margin-left:.125rem}.wp-block-a8c-navigation-menu .main-navigation .main-menu>li.menu-item-has-children{display:inline-block;position:inherit}.wp-block-a8c-navigation-menu .main-navigation .main-menu>li.menu-item-has-children .submenu-expand{display:inline-block;margin-left:.25rem}.wp-block-a8c-navigation-menu .main-navigation .main-menu>li.menu-item-has-children .submenu-expand svg{position:relative;top:.3rem}.main-navigation .main-menu>li>a:hover+svg,.wp-block-a8c-navigation-menu .main-navigation .main-menu>li>a:hover{color:#005177}.wp-block-a8c-navigation-menu .main-navigation svg{transition:fill .12s ease-in-out;fill:currentColor}.wp-block-a8c-navigation-menu .main-navigation a{text-decoration:none}.wp-block-a8c-navigation-menu .main-navigation button{display:inline-block;border:none;padding:0;margin:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;font-size:.88889em;font-weight:700;line-height:1.2;text-decoration:none;vertical-align:bottom;background:transparent;color:inherit;cursor:pointer;transition:background .25s ease-in-out,transform .15s ease;-webkit-appearance:none;-moz-appearance:none}.wp-block-a8c-navigation-menu .main-menu-more{display:none}.wp-block-a8c-navigation-menu .social-navigation{line-height:1.25;margin-top:.5rem;text-align:right}.wp-block-a8c-navigation-menu .social-navigation ul.social-links-menu{content:"";display:inline-block;margin:0;padding:0}.wp-block-a8c-navigation-menu .social-navigation ul.social-links-menu li{display:inline-block;vertical-align:bottom;vertical-align:-webkit-baseline-middle;list-style:none}.wp-block-a8c-navigation-menu .social-navigation ul.social-links-menu li a svg{display:block;width:32px;height:32px;transform:translateZ(0)}.wp-block-a8c-navigation-menu .footer-navigation .footer-menu{display:inline;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;font-size:.71111em;padding-right:0}.wp-block-a8c-navigation-menu .footer-navigation .footer-menu li{display:inline;margin-left:1rem}.wp-block-a8c-navigation-menu .footer-navigation .footer-menu a{text-decoration:none;color:#767676}.wp-block-a8c-navigation-menu .footer-navigation .footer-menu a:hover{text-decoration:none;color:#0073aa}.editor-styles-wrapper .wp-block-a8c-navigation-menu-toolbar a,.editor-styles-wrapper .wp-block-a8c-navigation-menu-toolbar a:hover{color:#555d66}.a8c-post-autocomplete{position:relative}.a8c-post-autocomplete .components-spinner{bottom:7px;position:absolute;left:-5px}.a8c-post-autocomplete__suggestions{max-height:200px;overflow-y:auto;width:302px}.a8c-post-autocomplete__suggestions .components-button{display:block;height:auto;min-height:30px;white-space:normal;width:100%;word-wrap:break-word}.post-content-block.alignfull{padding:0 12px}.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}.block-editor .wp-block-a8c-site-description,.block-editor .wp-block-a8c-site-description:focus{display:inline;color:#767676;font-size:1.125em;font-weight:400;letter-spacing:-.01em;margin:0}.template-block{min-height:200px}.template-block:hover .template-block__overlay{display:flex}.template-block.alignfull{padding:0 12px}.template-block__selector{width:300px}.template-block__selector a{font-family:sans-serif;font-size:13px;padding-right:8px}.template-block__content{pointer-events:none}.template-block__content:after{content:"";clear:both;display:table}.template-block__overlay{display:none;position:absolute;top:0;right:0;width:100%;height:100%}.wp-block-a8c-site-logo{pointer-events:none}
1
+ .wp-block-a8c-navigation-menu .main-navigation{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;font-size:1.125em;font-weight:700;letter-spacing:-.02em;line-height:1.2;pointer-events:none;-webkit-font-smoothing:antialiased}.wp-block-a8c-navigation-menu .main-navigation .main-menu{display:inline-block;margin:0;padding:0}.wp-block-a8c-navigation-menu .main-navigation .main-menu>li{color:#0073aa;display:inline;position:relative}.wp-block-a8c-navigation-menu .main-navigation .main-menu>li>a{font-weight:700;color:#0073aa;margin-left:.5rem}.main-navigation .main-menu>li:last-child.menu-item-has-children .submenu-expand,.wp-block-a8c-navigation-menu .main-navigation .main-menu>li:last-child>a{margin-left:0}.wp-block-a8c-navigation-menu .main-navigation .main-menu>li.menu-item-has-children>a{margin-left:.125rem}.wp-block-a8c-navigation-menu .main-navigation .main-menu>li.menu-item-has-children{display:inline-block;position:inherit}.wp-block-a8c-navigation-menu .main-navigation .main-menu>li.menu-item-has-children .submenu-expand{display:inline-block;margin-left:.25rem}.wp-block-a8c-navigation-menu .main-navigation .main-menu>li.menu-item-has-children .submenu-expand svg{position:relative;top:.3rem}.main-navigation .main-menu>li>a:hover+svg,.wp-block-a8c-navigation-menu .main-navigation .main-menu>li>a:hover{color:#005177}.wp-block-a8c-navigation-menu .main-navigation svg{transition:fill .12s ease-in-out;fill:currentColor}.wp-block-a8c-navigation-menu .main-navigation a{text-decoration:none}.wp-block-a8c-navigation-menu .main-navigation button{display:inline-block;border:none;padding:0;margin:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;font-size:.88889em;font-weight:700;line-height:1.2;text-decoration:none;vertical-align:bottom;background:transparent;color:inherit;cursor:pointer;transition:background .25s ease-in-out,transform .15s ease;-webkit-appearance:none;-moz-appearance:none}.wp-block-a8c-navigation-menu .main-menu-more{display:none}.wp-block-a8c-navigation-menu .social-navigation{line-height:1.25;margin-top:.5rem;text-align:right}.wp-block-a8c-navigation-menu .social-navigation ul.social-links-menu{content:"";display:inline-block;margin:0;padding:0}.wp-block-a8c-navigation-menu .social-navigation ul.social-links-menu li{display:inline-block;vertical-align:bottom;vertical-align:-webkit-baseline-middle;list-style:none}.wp-block-a8c-navigation-menu .social-navigation ul.social-links-menu li a svg{display:block;width:32px;height:32px;transform:translateZ(0)}.wp-block-a8c-navigation-menu .footer-navigation .footer-menu{display:inline;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;font-size:.71111em;padding-right:0}.wp-block-a8c-navigation-menu .footer-navigation .footer-menu li{display:inline;margin-left:1rem}.wp-block-a8c-navigation-menu .footer-navigation .footer-menu a{text-decoration:none;color:#767676}.wp-block-a8c-navigation-menu .footer-navigation .footer-menu a:hover{text-decoration:none;color:#0073aa}.editor-styles-wrapper .wp-block-a8c-navigation-menu-toolbar a,.editor-styles-wrapper .wp-block-a8c-navigation-menu-toolbar a:hover{color:#555d66}.a8c-post-autocomplete{position:relative}.a8c-post-autocomplete .components-spinner{bottom:7px;position:absolute;left:-5px}.a8c-post-autocomplete__suggestions{max-height:200px;overflow-y:auto;width:302px}.a8c-post-autocomplete__suggestions .components-button{display:block;height:auto;min-height:30px;white-space:normal;width:100%;word-wrap:break-word}.post-content-block.alignfull{padding:0 12px}.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}.block-editor .wp-block-a8c-site-description,.block-editor .wp-block-a8c-site-description:focus{display:inline;color:#767676;font-size:1.125em;font-weight:400;letter-spacing:-.01em;margin:0}.block-editor .site-description__save-button{margin-right:auto;display:block}.block-editor .wp-block-a8c-site-title,.block-editor .wp-block-a8c-site-title:focus{display:inline;color:#111;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;font-size:1.125em;font-weight:400;letter-spacing:-.02em;line-height:1.2;margin:0}.template-block{min-height:200px}.template-block:hover .template-block__overlay{display:flex}.template-block.alignfull{padding:0 12px}.template-block__selector{width:300px}.template-block__selector a{font-family:sans-serif;font-size:13px;padding-right:8px}.template-block__content{pointer-events:none}.template-block__content:after{content:"";clear:both;display:table}.template-block__overlay{display:none;position:absolute;top:0;right:0;width:100%;height:100%}.wp-block-a8c-site-logo{pointer-events:none}
full-site-editing/index.js CHANGED
@@ -4,6 +4,7 @@
4
  import './blocks/navigation-menu';
5
  import './blocks/post-content';
6
  import './blocks/site-description';
 
7
  import './blocks/template';
8
  import './blocks/site-logo';
9
  import './plugins/template-selector-sidebar';
4
  import './blocks/navigation-menu';
5
  import './blocks/post-content';
6
  import './blocks/site-description';
7
+ import './blocks/site-title';
8
  import './blocks/template';
9
  import './blocks/site-logo';
10
  import './plugins/template-selector-sidebar';
readme.txt CHANGED
@@ -3,7 +3,7 @@ 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.2
6
- Stable tag: 0.1.1
7
  Requires PHP: 5.6.20
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
@@ -40,6 +40,9 @@ This plugin is experimental, so we don't provide any support for it outside of w
40
 
41
  == Changelog ==
42
 
 
 
 
43
  = 0.2 =
44
  * Bug fixes and performance improvements.
45
 
3
  Tags: block, blocks, editor, gutenberg, page
4
  Requires at least: 5.0
5
  Tested up to: 5.2
6
+ Stable tag: 0.2
7
  Requires PHP: 5.6.20
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
40
 
41
  == Changelog ==
42
 
43
+ = 0.2.1 =
44
+ * Bug fix with sub-locales.
45
+
46
  = 0.2 =
47
  * Bug fixes and performance improvements.
48
 
starter-page-templates/class-starter-page-templates.php CHANGED
@@ -169,7 +169,7 @@ class Starter_Page_Templates {
169
  */
170
  public function fetch_vertical_data() {
171
  $vertical_id = get_option( 'site_vertical', 'default' );
172
- $transient_key = implode( '_', [ 'starter_page_templates', 'v2', $vertical_id, get_locale() ] );
173
  $vertical_templates = get_transient( $transient_key );
174
 
175
  // Load fresh data if we don't have any or vertical_id doesn't match.
@@ -199,10 +199,10 @@ class Starter_Page_Templates {
199
  private function get_iso_639_locale() {
200
  $language = strtolower( get_locale() );
201
 
202
- if ( in_array( $language, [ 'zh_tw', 'zh_cn' ], true ) ) {
203
  $language = str_replace( '_', '-', $language );
204
  } else {
205
- $language = preg_replace( '/(_.*)$/i', '', $language );
206
  }
207
 
208
  return $language;
169
  */
170
  public function fetch_vertical_data() {
171
  $vertical_id = get_option( 'site_vertical', 'default' );
172
+ $transient_key = implode( '_', [ 'starter_page_templates', A8C_FSE_VERSION, $vertical_id, get_locale() ] );
173
  $vertical_templates = get_transient( $transient_key );
174
 
175
  // Load fresh data if we don't have any or vertical_id doesn't match.
199
  private function get_iso_639_locale() {
200
  $language = strtolower( get_locale() );
201
 
202
+ if ( in_array( $language, [ 'zh_tw', 'zh-tw', 'zh_cn', 'zh-cn' ], true ) ) {
203
  $language = str_replace( '_', '-', $language );
204
  } else {
205
+ $language = preg_replace( '/([-_].*)$/i', '', $language );
206
  }
207
 
208
  return $language;
starter-page-templates/dist/starter-page-templates.css CHANGED
@@ -1 +1 @@
1
- .page-template-modal-screen-overlay{background-color:rgba(0,0,0,.7);animation:none}@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;max-width:800px;animation:none}.page-template-modal .components-modal__header-heading-container{justify-content:center}.page-template-modal__inner{max-width:700px;margin:0 auto;padding:1em 0 3em}.page-template-modal__intro{text-align:center;margin-left:auto;margin-right:auto}.page-template-modal__list{padding:1.5em 0}.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:repeat(auto-fit,minmax(200px,1fr));grid-gap:1.5em}.page-template-modal__list .template-selector-control__label{display:block;width:100%;text-align:center;border:1px solid transparent;padding:2em;border-radius:4px;cursor:pointer;background:none;-webkit-appearance:none;-moz-appearance:none;appearance:none}.page-template-modal__list .template-selector-control__label:hover{background:#f3f4f5}.page-template-modal__list .template-selector-control__label:focus{background:#f3f4f5;box-shadow:0 0 0 2px #00a0d2;outline:2px solid transparent;outline-offset:-2px}.page-template-modal__list .template-selector-control__media-wrap{width:100%;display:block;margin:0 auto 2em;border:1px solid rgba(25,30,35,.2);background:#f6f6f6;border-radius:4px;overflow:hidden;padding-bottom:133.33%;box-sizing:content-box;position:relative;pointer-events:none}.page-template-modal__list .template-selector-control__media{width:100%;display:block;position:absolute;top:0;left:0}.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}}
1
+ .page-template-modal-screen-overlay{background-color:rgba(0,0,0,.7);animation:none}@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;max-width:800px;animation:none}.page-template-modal .components-modal__header-heading-container{justify-content:center}.page-template-modal .components-modal__content{overflow-y:scroll;-webkit-overflow-scrolling:touch}.page-template-modal__inner{max-width:700px;margin:0 auto;padding:1em 0 3em}.page-template-modal__intro{text-align:center;margin-left:auto;margin-right:auto}.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 1fr;grid-gap:.5em}@media screen and (min-width:660px){.page-template-modal__list .template-selector-control__options{grid-template-columns:repeat(auto-fit,minmax(200px,1fr));grid-gap:1.5em}}.page-template-modal__list .template-selector-control__label{display:block;width:100%;text-align:center;border:1px solid transparent;border-radius:4px;cursor:pointer;background:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:1em}@media screen and (min-width:660px){.page-template-modal__list .template-selector-control__label{padding:2em}}.page-template-modal__list .template-selector-control__label:hover{background:#f3f4f5}.page-template-modal__list .template-selector-control__label:focus{background:#f3f4f5;box-shadow:0 0 0 2px #00a0d2;outline:2px solid transparent;outline-offset:-2px}.page-template-modal__list .template-selector-control__media-wrap{width:100%;display:block;margin:0 auto 2em;border:1px solid rgba(25,30,35,.2);background:#f6f6f6;border-radius:4px;overflow:hidden;padding-bottom:133.33%;box-sizing:content-box;position:relative;pointer-events:none}.page-template-modal__list .template-selector-control__media{width:100%;display:block;position:absolute;top:0;left:0}.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}}
starter-page-templates/dist/starter-page-templates.rtl.css CHANGED
@@ -1 +1 @@
1
- .page-template-modal-screen-overlay{background-color:rgba(0,0,0,.7);animation:none}@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;max-width:800px;animation:none}.page-template-modal .components-modal__header-heading-container{justify-content:center}.page-template-modal__inner{max-width:700px;margin:0 auto;padding:1em 0 3em}.page-template-modal__intro{text-align:center;margin-right:auto;margin-left:auto}.page-template-modal__list{padding:1.5em 0}.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:repeat(auto-fit,minmax(200px,1fr));grid-gap:1.5em}.page-template-modal__list .template-selector-control__label{display:block;width:100%;text-align:center;border:1px solid transparent;padding:2em;border-radius:4px;cursor:pointer;background:none;-webkit-appearance:none;-moz-appearance:none;appearance:none}.page-template-modal__list .template-selector-control__label:hover{background:#f3f4f5}.page-template-modal__list .template-selector-control__label:focus{background:#f3f4f5;box-shadow:0 0 0 2px #00a0d2;outline:2px solid transparent;outline-offset:-2px}.page-template-modal__list .template-selector-control__media-wrap{width:100%;display:block;margin:0 auto 2em;border:1px solid rgba(25,30,35,.2);background:#f6f6f6;border-radius:4px;overflow:hidden;padding-bottom:133.33%;box-sizing:content-box;position:relative;pointer-events:none}.page-template-modal__list .template-selector-control__media{width:100%;display:block;position:absolute;top:0;right:0}.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}}
1
+ .page-template-modal-screen-overlay{background-color:rgba(0,0,0,.7);animation:none}@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;max-width:800px;animation:none}.page-template-modal .components-modal__header-heading-container{justify-content:center}.page-template-modal .components-modal__content{overflow-y:scroll;-webkit-overflow-scrolling:touch}.page-template-modal__inner{max-width:700px;margin:0 auto;padding:1em 0 3em}.page-template-modal__intro{text-align:center;margin-right:auto;margin-left:auto}.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 1fr;grid-gap:.5em}@media screen and (min-width:660px){.page-template-modal__list .template-selector-control__options{grid-template-columns:repeat(auto-fit,minmax(200px,1fr));grid-gap:1.5em}}.page-template-modal__list .template-selector-control__label{display:block;width:100%;text-align:center;border:1px solid transparent;border-radius:4px;cursor:pointer;background:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:1em}@media screen and (min-width:660px){.page-template-modal__list .template-selector-control__label{padding:2em}}.page-template-modal__list .template-selector-control__label:hover{background:#f3f4f5}.page-template-modal__list .template-selector-control__label:focus{background:#f3f4f5;box-shadow:0 0 0 2px #00a0d2;outline:2px solid transparent;outline-offset:-2px}.page-template-modal__list .template-selector-control__media-wrap{width:100%;display:block;margin:0 auto 2em;border:1px solid rgba(25,30,35,.2);background:#f6f6f6;border-radius:4px;overflow:hidden;padding-bottom:133.33%;box-sizing:content-box;position:relative;pointer-events:none}.page-template-modal__list .template-selector-control__media{width:100%;display:block;position:absolute;top:0;right:0}.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}}
starter-page-templates/page-template-modal/styles/starter-page-templates-editor.scss CHANGED
@@ -51,6 +51,11 @@ body.admin-bar:not( .is-fullscreen-mode ) .page-template-modal-screen-overlay {
51
  justify-content: center;
52
  }
53
 
 
 
 
 
 
54
  .page-template-modal__inner {
55
  max-width: 700px;
56
  margin: 0 auto;
@@ -64,9 +69,6 @@ body.admin-bar:not( .is-fullscreen-mode ) .page-template-modal-screen-overlay {
64
  }
65
 
66
  .page-template-modal__list {
67
- padding: 1.5em 0;
68
-
69
-
70
  .components-base-control__label {
71
  @include screen-reader-text();
72
  }
@@ -74,8 +76,14 @@ body.admin-bar:not( .is-fullscreen-mode ) .page-template-modal-screen-overlay {
74
  .template-selector-control__options {
75
  display: grid;
76
  // stylelint-disable-next-line unit-whitelist
77
- grid-template-columns: repeat( auto-fit, minmax( 200px, 1fr ) );
78
- grid-gap: 1.5em;
 
 
 
 
 
 
79
  }
80
 
81
  .template-selector-control__label {
@@ -83,12 +91,16 @@ body.admin-bar:not( .is-fullscreen-mode ) .page-template-modal-screen-overlay {
83
  width: 100%;
84
  text-align: center;
85
  border: 1px solid transparent;
86
- padding: 2em;
87
  border-radius: 4px;
88
  cursor: pointer;
89
  background: none;
90
  appearance: none;
 
91
 
 
 
 
 
92
  &:hover {
93
  background: #f3f4f5;
94
  }
@@ -99,6 +111,7 @@ body.admin-bar:not( .is-fullscreen-mode ) .page-template-modal-screen-overlay {
99
  outline: 2px solid transparent;
100
  outline-offset: -2px;
101
  }
 
102
  }
103
 
104
  .template-selector-control__media-wrap {
51
  justify-content: center;
52
  }
53
 
54
+ .page-template-modal .components-modal__content {
55
+ overflow-y: scroll;
56
+ -webkit-overflow-scrolling: touch;
57
+ }
58
+
59
  .page-template-modal__inner {
60
  max-width: 700px;
61
  margin: 0 auto;
69
  }
70
 
71
  .page-template-modal__list {
 
 
 
72
  .components-base-control__label {
73
  @include screen-reader-text();
74
  }
76
  .template-selector-control__options {
77
  display: grid;
78
  // stylelint-disable-next-line unit-whitelist
79
+ grid-template-columns: 1fr 1fr; // force 2 col on small screens to ensure blank isn't the only option visible on load
80
+ grid-gap: 0.5em;
81
+
82
+ @media screen and ( min-width: 660px ) {
83
+ // stylelint-disable-next-line unit-whitelist
84
+ grid-template-columns: repeat( auto-fit, minmax( 200px, 1fr ) ); // allow grid to take over number of cols on large screens
85
+ grid-gap: 1.5em;
86
+ }
87
  }
88
 
89
  .template-selector-control__label {
91
  width: 100%;
92
  text-align: center;
93
  border: 1px solid transparent;
 
94
  border-radius: 4px;
95
  cursor: pointer;
96
  background: none;
97
  appearance: none;
98
+ padding: 1em;
99
 
100
+ @media screen and ( min-width: 660px ) {
101
+ padding: 2em;
102
+ }
103
+
104
  &:hover {
105
  background: #f3f4f5;
106
  }
111
  outline: 2px solid transparent;
112
  outline-offset: -2px;
113
  }
114
+
115
  }
116
 
117
  .template-selector-control__media-wrap {