Version Description
Download this release
Release Info
Developer | mmtr86 |
Plugin | Full Site Editing |
Version | 3.42824 |
Comparing to | |
See all releases |
Code changes from version 3.42812 to 3.42824
- build_meta.txt +3 -3
- full-site-editing-plugin.php +10 -2
- readme.txt +1 -1
- wpcom-global-styles/README.md +7 -0
- wpcom-global-styles/dist/images/image-193d312dedf57cb6412f.svg +20 -0
- wpcom-global-styles/dist/wpcom-global-styles.asset.php +1 -0
- wpcom-global-styles/dist/wpcom-global-styles.css +1 -0
- wpcom-global-styles/dist/wpcom-global-styles.js +262 -0
- wpcom-global-styles/dist/wpcom-global-styles.min.js +2 -0
- wpcom-global-styles/dist/wpcom-global-styles.rtl.css +1 -0
- wpcom-global-styles/image.svg +20 -0
- wpcom-global-styles/index.js +17 -0
- wpcom-global-styles/index.php +79 -0
- wpcom-global-styles/modal.js +63 -0
- wpcom-global-styles/modal.scss +82 -0
build_meta.txt
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
commit_hash=
|
2 |
-
commit_url=https://github.com/Automattic/wp-calypso/commit/
|
3 |
-
build_number=3.
|
1 |
+
commit_hash=0044d936cd77d5cfb1ec561c832f6fc4538e6ea2
|
2 |
+
commit_url=https://github.com/Automattic/wp-calypso/commit/0044d936cd77d5cfb1ec561c832f6fc4538e6ea2
|
3 |
+
build_number=3.42824
|
full-site-editing-plugin.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Plugin Name: WordPress.com Editing Toolkit
|
4 |
* Description: Enhances your page creation workflow within the Block Editor.
|
5 |
-
* Version: 3.
|
6 |
* Author: Automattic
|
7 |
* Author URI: https://automattic.com/wordpress-plugins/
|
8 |
* License: GPLv2 or later
|
@@ -42,7 +42,7 @@ namespace A8C\FSE;
|
|
42 |
*
|
43 |
* @var string
|
44 |
*/
|
45 |
-
define( 'A8C_ETK_PLUGIN_VERSION', '3.
|
46 |
|
47 |
// Always include these helper files for dotcom FSE.
|
48 |
require_once __DIR__ . '/dotcom-fse/helpers.php';
|
@@ -426,3 +426,11 @@ function load_tutorials() {
|
|
426 |
require_once __DIR__ . '/tutorials/tutorials.php';
|
427 |
}
|
428 |
add_action( 'plugins_loaded', __NAMESPACE__ . '\load_tutorials' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
/**
|
3 |
* Plugin Name: WordPress.com Editing Toolkit
|
4 |
* Description: Enhances your page creation workflow within the Block Editor.
|
5 |
+
* Version: 3.42824
|
6 |
* Author: Automattic
|
7 |
* Author URI: https://automattic.com/wordpress-plugins/
|
8 |
* License: GPLv2 or later
|
42 |
*
|
43 |
* @var string
|
44 |
*/
|
45 |
+
define( 'A8C_ETK_PLUGIN_VERSION', '3.42824' );
|
46 |
|
47 |
// Always include these helper files for dotcom FSE.
|
48 |
require_once __DIR__ . '/dotcom-fse/helpers.php';
|
426 |
require_once __DIR__ . '/tutorials/tutorials.php';
|
427 |
}
|
428 |
add_action( 'plugins_loaded', __NAMESPACE__ . '\load_tutorials' );
|
429 |
+
|
430 |
+
/**
|
431 |
+
* Load WP.com Global Styles.
|
432 |
+
*/
|
433 |
+
function load_wpcom_global_styles() {
|
434 |
+
require_once __DIR__ . '/wpcom-global-styles/index.php';
|
435 |
+
}
|
436 |
+
add_action( 'plugins_loaded', __NAMESPACE__ . '\load_wpcom_global_styles' );
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: automattic
|
|
3 |
Tags: block, blocks, editor, gutenberg, page
|
4 |
Requires at least: 5.5
|
5 |
Tested up to: 6.0
|
6 |
-
Stable tag: 3.
|
7 |
Requires PHP: 5.6.20
|
8 |
License: GPLv2 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
3 |
Tags: block, blocks, editor, gutenberg, page
|
4 |
Requires at least: 5.5
|
5 |
Tested up to: 6.0
|
6 |
+
Stable tag: 3.42824
|
7 |
Requires PHP: 5.6.20
|
8 |
License: GPLv2 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
wpcom-global-styles/README.md
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# WP.com Global Styles
|
2 |
+
|
3 |
+
Functionality that limits the Global Styles feature on WordPress.com sites to paid plans.
|
4 |
+
|
5 |
+
## Highlights
|
6 |
+
|
7 |
+
- The site editor displays a modal after opening the Global Styles panel to alert customers that it is a paid feature.
|
wpcom-global-styles/dist/images/image-193d312dedf57cb6412f.svg
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<svg width="318" height="224" viewBox="0 0 318 224" fill="none" xmlns="http://www.w3.org/2000/svg">
|
2 |
+
<rect x="0.5" width="179.5" height="64" rx="2" fill="white"/>
|
3 |
+
<path d="M38.6914 38.0117L33.6055 24.0781H31.9297L26.8906 37.7422C26.6484 38.4219 26.4258 38.9336 26.2227 39.2773C26.0273 39.6211 25.793 39.8633 25.5195 40.0039C25.2461 40.1445 24.8672 40.2461 24.3828 40.3086V41H29.4688V40.3086C28.8672 40.2305 28.4297 40.1172 28.1562 39.9688C27.8906 39.8203 27.7578 39.5781 27.7578 39.2422C27.7656 38.9062 27.8789 38.4258 28.0977 37.8008L32.1289 26.0938H31.8242L36.0078 38C36.2109 38.5625 36.3047 39 36.2891 39.3125C36.2812 39.6172 36.1445 39.8438 35.8789 39.9922C35.6133 40.1328 35.1875 40.2383 34.6016 40.3086V41H41.0703V40.3086C40.625 40.2461 40.2656 40.1523 39.9922 40.0273C39.7188 39.8945 39.4883 39.6758 39.3008 39.3711C39.1133 39.0586 38.9102 38.6055 38.6914 38.0117ZM28.5664 35.0586H36.1016L35.7734 34.168H28.8945L28.5664 35.0586ZM45.3297 41.2344C46.1891 41.2344 46.9508 41.0664 47.6148 40.7305C48.2867 40.3945 48.7789 39.9922 49.0914 39.5234C49.1695 39.8828 49.3102 40.1836 49.5133 40.4258C49.7242 40.668 49.982 40.8555 50.2867 40.9883C50.5914 41.1133 50.9391 41.1758 51.3297 41.1758C51.7359 41.1758 52.0992 41.1211 52.4195 41.0117C52.7398 40.9023 52.9937 40.7812 53.1812 40.6484V40.0156C53.0172 40.0859 52.8102 40.1211 52.5602 40.1211C52.2086 40.1211 51.9078 40.0117 51.6578 39.793C51.4156 39.5742 51.2945 39.2031 51.2945 38.6797V32.7852C51.2945 31.5508 50.9 30.6445 50.1109 30.0664C49.3297 29.4805 48.2867 29.1875 46.982 29.1875C46.1148 29.1875 45.3258 29.3008 44.6148 29.5273C43.9117 29.7539 43.3492 30.0664 42.9273 30.4648C42.5055 30.8633 42.2945 31.3242 42.2945 31.8477C42.2945 32.2148 42.4195 32.5195 42.6695 32.7617C42.9273 32.9961 43.232 33.1133 43.5836 33.1133C43.9508 33.1133 44.2594 32.9961 44.5094 32.7617C44.7594 32.5273 44.8844 32.2383 44.8844 31.8945C44.8844 31.5508 44.7672 31.2578 44.5328 31.0156C44.2984 30.7734 44.0211 30.6523 43.7008 30.6523C43.4039 30.6523 43.1422 30.7891 42.9156 31.0625C42.6891 31.3281 42.5719 31.6562 42.5641 32.0469H43.0328C43.1266 31.6484 43.3219 31.3125 43.6187 31.0391C43.9156 30.7578 44.2828 30.5469 44.7203 30.4062C45.1578 30.2578 45.6383 30.1836 46.1617 30.1836C47.0133 30.1836 47.7047 30.3984 48.2359 30.8281C48.7672 31.2578 49.0328 32.0078 49.0328 33.0781V38.8086C48.775 39.1914 48.4273 39.4922 47.9898 39.7109C47.5602 39.9219 47.0719 40.0273 46.525 40.0273C45.8766 40.0273 45.3375 39.8438 44.9078 39.4766C44.4859 39.1016 44.275 38.582 44.275 37.918C44.275 37.2617 44.5094 36.7305 44.9781 36.3242C45.4547 35.9102 46.2789 35.5703 47.4508 35.3047L49.9469 34.7656V33.9219L46.4078 34.6953C45.3531 34.9219 44.4937 35.1992 43.8297 35.5273C43.1734 35.8555 42.693 36.25 42.3883 36.7109C42.0836 37.1641 41.9312 37.6992 41.9312 38.3164C41.9312 39.1758 42.2555 39.8789 42.9039 40.4258C43.5523 40.9648 44.3609 41.2344 45.3297 41.2344Z" fill="black"/>
|
4 |
+
<circle cx="152" cy="24" r="4" fill="#264447"/>
|
5 |
+
<circle cx="152" cy="40" r="4" fill="#FAE3CA"/>
|
6 |
+
<rect x="196" width="179.5" height="64" rx="3" fill="#FAE3CA"/>
|
7 |
+
<path d="M222.83 41H220.614L227.023 23.5455H229.205L235.614 41H233.398L228.182 26.3068H228.045L222.83 41ZM223.648 34.1818H232.58V36.0568H223.648V34.1818ZM241.812 41.3068C240.982 41.3068 240.23 41.1506 239.553 40.8381C238.877 40.5199 238.34 40.0625 237.943 39.4659C237.545 38.8636 237.346 38.1364 237.346 37.2841C237.346 36.5341 237.494 35.9261 237.789 35.4602C238.085 34.9886 238.48 34.6193 238.974 34.3523C239.468 34.0852 240.014 33.8864 240.61 33.7557C241.212 33.6193 241.818 33.5114 242.426 33.4318C243.221 33.3295 243.866 33.2528 244.36 33.2017C244.86 33.1449 245.224 33.0511 245.451 32.9205C245.684 32.7898 245.801 32.5625 245.801 32.2386V32.1705C245.801 31.3295 245.57 30.6761 245.11 30.2102C244.656 29.7443 243.965 29.5114 243.039 29.5114C242.079 29.5114 241.326 29.7216 240.781 30.142C240.235 30.5625 239.852 31.0114 239.63 31.4886L237.721 30.8068C238.062 30.0114 238.516 29.392 239.085 28.9489C239.659 28.5 240.284 28.1875 240.96 28.0114C241.641 27.8295 242.312 27.7386 242.971 27.7386C243.391 27.7386 243.874 27.7898 244.42 27.892C244.971 27.9886 245.502 28.1903 246.014 28.4972C246.531 28.804 246.96 29.267 247.301 29.8864C247.641 30.5057 247.812 31.3352 247.812 32.375V41H245.801V39.2273H245.698C245.562 39.5114 245.335 39.8153 245.016 40.1392C244.698 40.4631 244.275 40.7386 243.747 40.9659C243.218 41.1932 242.573 41.3068 241.812 41.3068ZM242.119 39.5C242.914 39.5 243.585 39.3438 244.13 39.0312C244.681 38.7188 245.096 38.3153 245.374 37.821C245.659 37.3267 245.801 36.8068 245.801 36.2614V34.4205C245.715 34.5227 245.528 34.6165 245.238 34.7017C244.954 34.7812 244.624 34.8523 244.249 34.9148C243.88 34.9716 243.519 35.0227 243.167 35.0682C242.82 35.108 242.539 35.142 242.323 35.1705C241.801 35.2386 241.312 35.3494 240.857 35.5028C240.409 35.6506 240.045 35.875 239.766 36.1761C239.494 36.4716 239.357 36.875 239.357 37.3864C239.357 38.0852 239.616 38.6136 240.133 38.9716C240.656 39.3239 241.318 39.5 242.119 39.5Z" fill="black"/>
|
8 |
+
<rect x="0.5" y="80" width="179.5" height="64" rx="3" fill="black"/>
|
9 |
+
<path d="M27.3295 121H25.1136L31.5227 103.545H33.7045L40.1136 121H37.8977L32.6818 106.307H32.5455L27.3295 121ZM28.1477 114.182H37.0795V116.057H28.1477V114.182ZM46.3119 121.307C45.4824 121.307 44.7295 121.151 44.0534 120.838C43.3773 120.52 42.8403 120.062 42.4426 119.466C42.0449 118.864 41.846 118.136 41.846 117.284C41.846 116.534 41.9937 115.926 42.2892 115.46C42.5847 114.989 42.9795 114.619 43.4739 114.352C43.9682 114.085 44.5136 113.886 45.1102 113.756C45.7125 113.619 46.3176 113.511 46.9256 113.432C47.721 113.33 48.3659 113.253 48.8602 113.202C49.3602 113.145 49.7239 113.051 49.9511 112.92C50.1841 112.79 50.3006 112.562 50.3006 112.239V112.17C50.3006 111.33 50.0705 110.676 49.6102 110.21C49.1557 109.744 48.4653 109.511 47.5392 109.511C46.579 109.511 45.8261 109.722 45.2807 110.142C44.7352 110.562 44.3517 111.011 44.1301 111.489L42.221 110.807C42.5619 110.011 43.0165 109.392 43.5847 108.949C44.1585 108.5 44.7835 108.187 45.4597 108.011C46.1415 107.83 46.8119 107.739 47.471 107.739C47.8915 107.739 48.3744 107.79 48.9199 107.892C49.471 107.989 50.0023 108.19 50.5136 108.497C51.0307 108.804 51.4597 109.267 51.8006 109.886C52.1415 110.506 52.3119 111.335 52.3119 112.375V121H50.3006V119.227H50.1983C50.0619 119.511 49.8347 119.815 49.5165 120.139C49.1983 120.463 48.775 120.739 48.2466 120.966C47.7182 121.193 47.0733 121.307 46.3119 121.307ZM46.6187 119.5C47.4142 119.5 48.0847 119.344 48.6301 119.031C49.1812 118.719 49.596 118.315 49.8744 117.821C50.1585 117.327 50.3006 116.807 50.3006 116.261V114.42C50.2153 114.523 50.0278 114.616 49.7381 114.702C49.454 114.781 49.1244 114.852 48.7494 114.915C48.3801 114.972 48.0193 115.023 47.667 115.068C47.3205 115.108 47.0392 115.142 46.8233 115.17C46.3006 115.239 45.8119 115.349 45.3574 115.503C44.9085 115.651 44.5449 115.875 44.2665 116.176C43.9937 116.472 43.8574 116.875 43.8574 117.386C43.8574 118.085 44.1159 118.614 44.633 118.972C45.1557 119.324 45.8176 119.5 46.6187 119.5Z" fill="white"/>
|
10 |
+
<circle cx="152" cy="104" r="4" fill="white"/>
|
11 |
+
<circle cx="152" cy="120" r="4" fill="#DE7700"/>
|
12 |
+
<rect x="196" y="80" width="179.5" height="64" rx="3" fill="#424CBF"/>
|
13 |
+
<path d="M234.191 118.012L229.105 104.078H227.43L222.391 117.742C222.148 118.422 221.926 118.934 221.723 119.277C221.527 119.621 221.293 119.863 221.02 120.004C220.746 120.145 220.367 120.246 219.883 120.309V121H224.969V120.309C224.367 120.23 223.93 120.117 223.656 119.969C223.391 119.82 223.258 119.578 223.258 119.242C223.266 118.906 223.379 118.426 223.598 117.801L227.629 106.094H227.324L231.508 118C231.711 118.562 231.805 119 231.789 119.312C231.781 119.617 231.645 119.844 231.379 119.992C231.113 120.133 230.688 120.238 230.102 120.309V121H236.57V120.309C236.125 120.246 235.766 120.152 235.492 120.027C235.219 119.895 234.988 119.676 234.801 119.371C234.613 119.059 234.41 118.605 234.191 118.012ZM224.066 115.059H231.602L231.273 114.168H224.395L224.066 115.059ZM240.83 121.234C241.689 121.234 242.451 121.066 243.115 120.73C243.787 120.395 244.279 119.992 244.591 119.523C244.67 119.883 244.81 120.184 245.013 120.426C245.224 120.668 245.482 120.855 245.787 120.988C246.091 121.113 246.439 121.176 246.83 121.176C247.236 121.176 247.599 121.121 247.92 121.012C248.24 120.902 248.494 120.781 248.681 120.648V120.016C248.517 120.086 248.31 120.121 248.06 120.121C247.709 120.121 247.408 120.012 247.158 119.793C246.916 119.574 246.795 119.203 246.795 118.68V112.785C246.795 111.551 246.4 110.645 245.611 110.066C244.83 109.48 243.787 109.188 242.482 109.188C241.615 109.188 240.826 109.301 240.115 109.527C239.412 109.754 238.849 110.066 238.427 110.465C238.005 110.863 237.795 111.324 237.795 111.848C237.795 112.215 237.92 112.52 238.17 112.762C238.427 112.996 238.732 113.113 239.084 113.113C239.451 113.113 239.759 112.996 240.009 112.762C240.259 112.527 240.384 112.238 240.384 111.895C240.384 111.551 240.267 111.258 240.033 111.016C239.798 110.773 239.521 110.652 239.201 110.652C238.904 110.652 238.642 110.789 238.416 111.062C238.189 111.328 238.072 111.656 238.064 112.047H238.533C238.627 111.648 238.822 111.312 239.119 111.039C239.416 110.758 239.783 110.547 240.22 110.406C240.658 110.258 241.138 110.184 241.662 110.184C242.513 110.184 243.205 110.398 243.736 110.828C244.267 111.258 244.533 112.008 244.533 113.078V118.809C244.275 119.191 243.927 119.492 243.49 119.711C243.06 119.922 242.572 120.027 242.025 120.027C241.377 120.027 240.837 119.844 240.408 119.477C239.986 119.102 239.775 118.582 239.775 117.918C239.775 117.262 240.009 116.73 240.478 116.324C240.955 115.91 241.779 115.57 242.951 115.305L245.447 114.766V113.922L241.908 114.695C240.853 114.922 239.994 115.199 239.33 115.527C238.673 115.855 238.193 116.25 237.888 116.711C237.584 117.164 237.431 117.699 237.431 118.316C237.431 119.176 237.755 119.879 238.404 120.426C239.052 120.965 239.861 121.234 240.83 121.234Z" fill="white"/>
|
14 |
+
<rect x="0.5" y="160" width="179.5" height="64" rx="3" fill="#64589E"/>
|
15 |
+
<path d="M27.3295 201H25.1136L31.5227 183.545H33.7045L40.1136 201H37.8977L32.6818 186.307H32.5455L27.3295 201ZM28.1477 194.182H37.0795V196.057H28.1477V194.182ZM46.3119 201.307C45.4824 201.307 44.7295 201.151 44.0534 200.838C43.3773 200.52 42.8403 200.062 42.4426 199.466C42.0449 198.864 41.846 198.136 41.846 197.284C41.846 196.534 41.9937 195.926 42.2892 195.46C42.5847 194.989 42.9795 194.619 43.4739 194.352C43.9682 194.085 44.5136 193.886 45.1102 193.756C45.7125 193.619 46.3176 193.511 46.9256 193.432C47.721 193.33 48.3659 193.253 48.8602 193.202C49.3602 193.145 49.7239 193.051 49.9511 192.92C50.1841 192.79 50.3006 192.562 50.3006 192.239V192.17C50.3006 191.33 50.0705 190.676 49.6102 190.21C49.1557 189.744 48.4653 189.511 47.5392 189.511C46.579 189.511 45.8261 189.722 45.2807 190.142C44.7352 190.562 44.3517 191.011 44.1301 191.489L42.221 190.807C42.5619 190.011 43.0165 189.392 43.5847 188.949C44.1585 188.5 44.7835 188.187 45.4597 188.011C46.1415 187.83 46.8119 187.739 47.471 187.739C47.8915 187.739 48.3744 187.79 48.9199 187.892C49.471 187.989 50.0023 188.19 50.5136 188.497C51.0307 188.804 51.4597 189.267 51.8006 189.886C52.1415 190.506 52.3119 191.335 52.3119 192.375V201H50.3006V199.227H50.1983C50.0619 199.511 49.8347 199.815 49.5165 200.139C49.1983 200.463 48.775 200.739 48.2466 200.966C47.7182 201.193 47.0733 201.307 46.3119 201.307ZM46.6187 199.5C47.4142 199.5 48.0847 199.344 48.6301 199.031C49.1812 198.719 49.596 198.315 49.8744 197.821C50.1585 197.327 50.3006 196.807 50.3006 196.261V194.42C50.2153 194.523 50.0278 194.616 49.7381 194.702C49.454 194.781 49.1244 194.852 48.7494 194.915C48.3801 194.972 48.0193 195.023 47.667 195.068C47.3205 195.108 47.0392 195.142 46.8233 195.17C46.3006 195.239 45.8119 195.349 45.3574 195.503C44.9085 195.651 44.5449 195.875 44.2665 196.176C43.9937 196.472 43.8574 196.875 43.8574 197.386C43.8574 198.085 44.1159 198.614 44.633 198.972C45.1557 199.324 45.8176 199.5 46.6187 199.5Z" fill="white"/>
|
16 |
+
<circle cx="152" cy="184" r="4" fill="white"/>
|
17 |
+
<circle cx="152" cy="200" r="4" fill="black"/>
|
18 |
+
<rect x="196" y="160" width="179.5" height="64" rx="3" fill="#B5AFD0"/>
|
19 |
+
<path d="M234.191 198.012L229.105 184.078H227.43L222.391 197.742C222.148 198.422 221.926 198.934 221.723 199.277C221.527 199.621 221.293 199.863 221.02 200.004C220.746 200.145 220.367 200.246 219.883 200.309V201H224.969V200.309C224.367 200.23 223.93 200.117 223.656 199.969C223.391 199.82 223.258 199.578 223.258 199.242C223.266 198.906 223.379 198.426 223.598 197.801L227.629 186.094H227.324L231.508 198C231.711 198.562 231.805 199 231.789 199.312C231.781 199.617 231.645 199.844 231.379 199.992C231.113 200.133 230.688 200.238 230.102 200.309V201H236.57V200.309C236.125 200.246 235.766 200.152 235.492 200.027C235.219 199.895 234.988 199.676 234.801 199.371C234.613 199.059 234.41 198.605 234.191 198.012ZM224.066 195.059H231.602L231.273 194.168H224.395L224.066 195.059ZM240.83 201.234C241.689 201.234 242.451 201.066 243.115 200.73C243.787 200.395 244.279 199.992 244.591 199.523C244.67 199.883 244.81 200.184 245.013 200.426C245.224 200.668 245.482 200.855 245.787 200.988C246.091 201.113 246.439 201.176 246.83 201.176C247.236 201.176 247.599 201.121 247.92 201.012C248.24 200.902 248.494 200.781 248.681 200.648V200.016C248.517 200.086 248.31 200.121 248.06 200.121C247.709 200.121 247.408 200.012 247.158 199.793C246.916 199.574 246.795 199.203 246.795 198.68V192.785C246.795 191.551 246.4 190.645 245.611 190.066C244.83 189.48 243.787 189.188 242.482 189.188C241.615 189.188 240.826 189.301 240.115 189.527C239.412 189.754 238.849 190.066 238.427 190.465C238.005 190.863 237.795 191.324 237.795 191.848C237.795 192.215 237.92 192.52 238.17 192.762C238.427 192.996 238.732 193.113 239.084 193.113C239.451 193.113 239.759 192.996 240.009 192.762C240.259 192.527 240.384 192.238 240.384 191.895C240.384 191.551 240.267 191.258 240.033 191.016C239.798 190.773 239.521 190.652 239.201 190.652C238.904 190.652 238.642 190.789 238.416 191.062C238.189 191.328 238.072 191.656 238.064 192.047H238.533C238.627 191.648 238.822 191.312 239.119 191.039C239.416 190.758 239.783 190.547 240.22 190.406C240.658 190.258 241.138 190.184 241.662 190.184C242.513 190.184 243.205 190.398 243.736 190.828C244.267 191.258 244.533 192.008 244.533 193.078V198.809C244.275 199.191 243.927 199.492 243.49 199.711C243.06 199.922 242.572 200.027 242.025 200.027C241.377 200.027 240.837 199.844 240.408 199.477C239.986 199.102 239.775 198.582 239.775 197.918C239.775 197.262 240.009 196.73 240.478 196.324C240.955 195.91 241.779 195.57 242.951 195.305L245.447 194.766V193.922L241.908 194.695C240.853 194.922 239.994 195.199 239.33 195.527C238.673 195.855 238.193 196.25 237.888 196.711C237.584 197.164 237.431 197.699 237.431 198.316C237.431 199.176 237.755 199.879 238.404 200.426C239.052 200.965 239.861 201.234 240.83 201.234Z" fill="#2B2647"/>
|
20 |
+
</svg>
|
wpcom-global-styles/dist/wpcom-global-styles.asset.php
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<?php return array('dependencies' => array('react', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-plugins', 'wp-polyfill'), 'version' => '9bd0691afc56cf59a2a0');
|
wpcom-global-styles/dist/wpcom-global-styles.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
@font-face{font-display:swap;font-family:Recoleta;font-weight:400;src:url("https://s1.wp.com/i/fonts/recoleta/400.woff2") format("woff2"),url("https://s1.wp.com/i/fonts/recoleta/400.woff") format("woff")}.wp-brand-font{font-family:"Noto Serif",Georgia,"Times New Roman",Times,serif;font-weight:400}[lang*=af] .wp-brand-font{font-family:"Recoleta","Noto Serif",Georgia,"Times New Roman",Times,serif}[lang*=ca] .wp-brand-font{font-family:"Recoleta","Noto Serif",Georgia,"Times New Roman",Times,serif}[lang*=cs] .wp-brand-font{font-family:"Recoleta","Noto Serif",Georgia,"Times New Roman",Times,serif}[lang*=da] .wp-brand-font{font-family:"Recoleta","Noto Serif",Georgia,"Times New Roman",Times,serif}[lang*=de] .wp-brand-font{font-family:"Recoleta","Noto Serif",Georgia,"Times New Roman",Times,serif}[lang*=en] .wp-brand-font{font-family:"Recoleta","Noto Serif",Georgia,"Times New Roman",Times,serif}[lang*=es] .wp-brand-font{font-family:"Recoleta","Noto Serif",Georgia,"Times New Roman",Times,serif}[lang*=eu] .wp-brand-font{font-family:"Recoleta","Noto Serif",Georgia,"Times New Roman",Times,serif}[lang*=fi] .wp-brand-font{font-family:"Recoleta","Noto Serif",Georgia,"Times New Roman",Times,serif}[lang*=fr] .wp-brand-font{font-family:"Recoleta","Noto Serif",Georgia,"Times New Roman",Times,serif}[lang*=gl] .wp-brand-font{font-family:"Recoleta","Noto Serif",Georgia,"Times New Roman",Times,serif}[lang*=hr] .wp-brand-font{font-family:"Recoleta","Noto Serif",Georgia,"Times New Roman",Times,serif}[lang*=hu] .wp-brand-font{font-family:"Recoleta","Noto Serif",Georgia,"Times New Roman",Times,serif}[lang*=id] .wp-brand-font{font-family:"Recoleta","Noto Serif",Georgia,"Times New Roman",Times,serif}[lang*=is] .wp-brand-font{font-family:"Recoleta","Noto Serif",Georgia,"Times New Roman",Times,serif}[lang*=it] .wp-brand-font{font-family:"Recoleta","Noto Serif",Georgia,"Times New Roman",Times,serif}[lang*=lv] .wp-brand-font{font-family:"Recoleta","Noto Serif",Georgia,"Times New Roman",Times,serif}[lang*=mt] .wp-brand-font{font-family:"Recoleta","Noto Serif",Georgia,"Times New Roman",Times,serif}[lang*=nb] .wp-brand-font{font-family:"Recoleta","Noto Serif",Georgia,"Times New Roman",Times,serif}[lang*=nl] .wp-brand-font{font-family:"Recoleta","Noto Serif",Georgia,"Times New Roman",Times,serif}[lang*=pl] .wp-brand-font{font-family:"Recoleta","Noto Serif",Georgia,"Times New Roman",Times,serif}[lang*=pt] .wp-brand-font{font-family:"Recoleta","Noto Serif",Georgia,"Times New Roman",Times,serif}[lang*=ro] .wp-brand-font{font-family:"Recoleta","Noto Serif",Georgia,"Times New Roman",Times,serif}[lang*=ru] .wp-brand-font{font-family:"Recoleta","Noto Serif",Georgia,"Times New Roman",Times,serif}[lang*=sk] .wp-brand-font{font-family:"Recoleta","Noto Serif",Georgia,"Times New Roman",Times,serif}[lang*=sl] .wp-brand-font{font-family:"Recoleta","Noto Serif",Georgia,"Times New Roman",Times,serif}[lang*=sq] .wp-brand-font{font-family:"Recoleta","Noto Serif",Georgia,"Times New Roman",Times,serif}[lang*=sr] .wp-brand-font{font-family:"Recoleta","Noto Serif",Georgia,"Times New Roman",Times,serif}[lang*=sv] .wp-brand-font{font-family:"Recoleta","Noto Serif",Georgia,"Times New Roman",Times,serif}[lang*=sw] .wp-brand-font{font-family:"Recoleta","Noto Serif",Georgia,"Times New Roman",Times,serif}[lang*=tr] .wp-brand-font{font-family:"Recoleta","Noto Serif",Georgia,"Times New Roman",Times,serif}[lang*=uz] .wp-brand-font{font-family:"Recoleta","Noto Serif",Georgia,"Times New Roman",Times,serif}.wpcom-global-styles-modal .components-modal__content{padding:0;margin-top:0;display:flex;flex-direction:column-reverse;justify-content:flex-end}@media(min-width: 600px){.wpcom-global-styles-modal .components-modal__content{flex-direction:row;justify-content:flex-start}}.wpcom-global-styles-modal .components-modal__header{height:auto;position:absolute}.wpcom-global-styles-modal .components-modal__header .components-button{top:16px}.wpcom-global-styles-modal .wpcom-global-styles-modal__text,.wpcom-global-styles-modal .wpcom-global-styles-modal__image{width:100%}@media(min-width: 600px){.wpcom-global-styles-modal .wpcom-global-styles-modal__text,.wpcom-global-styles-modal .wpcom-global-styles-modal__image{width:auto;max-width:380px}}.wpcom-global-styles-modal .wpcom-global-styles-modal__text{padding:64px 48px;display:flex;flex-direction:column}.wpcom-global-styles-modal .wpcom-global-styles-modal__heading{margin-top:0;font-family:"Recoleta","Noto Serif",Georgia,"Times New Roman",Times,serif;font-weight:400;font-size:2rem;line-height:40px;margin-bottom:16px}.wpcom-global-styles-modal .wpcom-global-styles-modal__description{font-size:1rem;line-height:24px;margin-top:0;margin-bottom:32px}.wpcom-global-styles-modal .wpcom-global-styles-modal__actions{display:flex;justify-content:center;gap:16px;margin-top:auto}.wpcom-global-styles-modal .wpcom-global-styles-modal__actions .components-button{flex-grow:1;justify-content:center}.wpcom-global-styles-modal .wpcom-global-styles-modal__image{background-color:#d0cce3;padding:64px 0 64px 64px;display:flex;justify-content:flex-end}.wpcom-global-styles-modal .wpcom-global-styles-modal__image img{width:100%}
|
wpcom-global-styles/dist/wpcom-global-styles.js
ADDED
@@ -0,0 +1,262 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/******/ (() => { // webpackBootstrap
|
2 |
+
/******/ "use strict";
|
3 |
+
/******/ var __webpack_modules__ = ({
|
4 |
+
|
5 |
+
/***/ 612:
|
6 |
+
/***/ (() => {
|
7 |
+
|
8 |
+
// extracted by mini-css-extract-plugin
|
9 |
+
|
10 |
+
|
11 |
+
/***/ }),
|
12 |
+
|
13 |
+
/***/ 93:
|
14 |
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
15 |
+
|
16 |
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
17 |
+
/* harmony export */ "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
|
18 |
+
/* harmony export */ });
|
19 |
+
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(307);
|
20 |
+
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
|
21 |
+
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(609);
|
22 |
+
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__);
|
23 |
+
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(736);
|
24 |
+
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);
|
25 |
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(196);
|
26 |
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);
|
27 |
+
/* harmony import */ var _image_svg__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(731);
|
28 |
+
/* harmony import */ var _modal_scss__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(612);
|
29 |
+
|
30 |
+
|
31 |
+
|
32 |
+
|
33 |
+
const __ = _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__;
|
34 |
+
|
35 |
+
|
36 |
+
|
37 |
+
|
38 |
+
const GlobalStylesModal = () => {
|
39 |
+
const [isVisible, setIsVisible] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(true);
|
40 |
+
|
41 |
+
if (!isVisible) {
|
42 |
+
return null;
|
43 |
+
}
|
44 |
+
|
45 |
+
const searchParams = new URLSearchParams(window.location.search);
|
46 |
+
const params = Object.fromEntries(searchParams.entries());
|
47 |
+
const {
|
48 |
+
origin
|
49 |
+
} = params;
|
50 |
+
const calypsoDomain = ['http://calypso.localhost:3000', 'https://wpcalypso.wordpress.com', 'https://horizon.wordpress.com'].includes(origin) ? origin : 'https://wordpress.com';
|
51 |
+
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Modal, {
|
52 |
+
className: "wpcom-global-styles-modal",
|
53 |
+
open: isVisible,
|
54 |
+
onRequestClose: () => setIsVisible(false)
|
55 |
+
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
|
56 |
+
className: "wpcom-global-styles-modal__text"
|
57 |
+
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("h1", {
|
58 |
+
className: "wpcom-global-styles-modal__heading"
|
59 |
+
}, __('A powerful new way to style your site', 'full-site-editing')), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", {
|
60 |
+
className: "wpcom-global-styles-modal__description"
|
61 |
+
}, __("Change all of your site's fonts, colors and more. Available on any paid plan.", 'full-site-editing')), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
|
62 |
+
className: "wpcom-global-styles-modal__actions"
|
63 |
+
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, {
|
64 |
+
variant: "secondary",
|
65 |
+
onClick: () => setIsVisible(false)
|
66 |
+
}, __('Try it out', 'full-site-editing')), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, {
|
67 |
+
variant: "primary",
|
68 |
+
href: `${calypsoDomain}/plans/${window._currentSiteId ?? ''}`,
|
69 |
+
target: "_top"
|
70 |
+
}, __('Upgrade plan', 'full-site-editing')))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
|
71 |
+
className: "wpcom-global-styles-modal__image"
|
72 |
+
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("img", {
|
73 |
+
src: _image_svg__WEBPACK_IMPORTED_MODULE_4__,
|
74 |
+
alt: ""
|
75 |
+
})));
|
76 |
+
};
|
77 |
+
|
78 |
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (GlobalStylesModal);
|
79 |
+
|
80 |
+
/***/ }),
|
81 |
+
|
82 |
+
/***/ 731:
|
83 |
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
84 |
+
|
85 |
+
module.exports = __webpack_require__.p + "images/image-193d312dedf57cb6412f.svg";
|
86 |
+
|
87 |
+
/***/ }),
|
88 |
+
|
89 |
+
/***/ 196:
|
90 |
+
/***/ ((module) => {
|
91 |
+
|
92 |
+
module.exports = window["React"];
|
93 |
+
|
94 |
+
/***/ }),
|
95 |
+
|
96 |
+
/***/ 609:
|
97 |
+
/***/ ((module) => {
|
98 |
+
|
99 |
+
module.exports = window["wp"]["components"];
|
100 |
+
|
101 |
+
/***/ }),
|
102 |
+
|
103 |
+
/***/ 818:
|
104 |
+
/***/ ((module) => {
|
105 |
+
|
106 |
+
module.exports = window["wp"]["data"];
|
107 |
+
|
108 |
+
/***/ }),
|
109 |
+
|
110 |
+
/***/ 307:
|
111 |
+
/***/ ((module) => {
|
112 |
+
|
113 |
+
module.exports = window["wp"]["element"];
|
114 |
+
|
115 |
+
/***/ }),
|
116 |
+
|
117 |
+
/***/ 736:
|
118 |
+
/***/ ((module) => {
|
119 |
+
|
120 |
+
module.exports = window["wp"]["i18n"];
|
121 |
+
|
122 |
+
/***/ }),
|
123 |
+
|
124 |
+
/***/ 817:
|
125 |
+
/***/ ((module) => {
|
126 |
+
|
127 |
+
module.exports = window["wp"]["plugins"];
|
128 |
+
|
129 |
+
/***/ })
|
130 |
+
|
131 |
+
/******/ });
|
132 |
+
/************************************************************************/
|
133 |
+
/******/ // The module cache
|
134 |
+
/******/ var __webpack_module_cache__ = {};
|
135 |
+
/******/
|
136 |
+
/******/ // The require function
|
137 |
+
/******/ function __webpack_require__(moduleId) {
|
138 |
+
/******/ // Check if module is in cache
|
139 |
+
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
140 |
+
/******/ if (cachedModule !== undefined) {
|
141 |
+
/******/ return cachedModule.exports;
|
142 |
+
/******/ }
|
143 |
+
/******/ // Create a new module (and put it into the cache)
|
144 |
+
/******/ var module = __webpack_module_cache__[moduleId] = {
|
145 |
+
/******/ // no module.id needed
|
146 |
+
/******/ // no module.loaded needed
|
147 |
+
/******/ exports: {}
|
148 |
+
/******/ };
|
149 |
+
/******/
|
150 |
+
/******/ // Execute the module function
|
151 |
+
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
152 |
+
/******/
|
153 |
+
/******/ // Return the exports of the module
|
154 |
+
/******/ return module.exports;
|
155 |
+
/******/ }
|
156 |
+
/******/
|
157 |
+
/************************************************************************/
|
158 |
+
/******/ /* webpack/runtime/compat get default export */
|
159 |
+
/******/ (() => {
|
160 |
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
161 |
+
/******/ __webpack_require__.n = (module) => {
|
162 |
+
/******/ var getter = module && module.__esModule ?
|
163 |
+
/******/ () => (module['default']) :
|
164 |
+
/******/ () => (module);
|
165 |
+
/******/ __webpack_require__.d(getter, { a: getter });
|
166 |
+
/******/ return getter;
|
167 |
+
/******/ };
|
168 |
+
/******/ })();
|
169 |
+
/******/
|
170 |
+
/******/ /* webpack/runtime/define property getters */
|
171 |
+
/******/ (() => {
|
172 |
+
/******/ // define getter functions for harmony exports
|
173 |
+
/******/ __webpack_require__.d = (exports, definition) => {
|
174 |
+
/******/ for(var key in definition) {
|
175 |
+
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
176 |
+
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
177 |
+
/******/ }
|
178 |
+
/******/ }
|
179 |
+
/******/ };
|
180 |
+
/******/ })();
|
181 |
+
/******/
|
182 |
+
/******/ /* webpack/runtime/global */
|
183 |
+
/******/ (() => {
|
184 |
+
/******/ __webpack_require__.g = (function() {
|
185 |
+
/******/ if (typeof globalThis === 'object') return globalThis;
|
186 |
+
/******/ try {
|
187 |
+
/******/ return this || new Function('return this')();
|
188 |
+
/******/ } catch (e) {
|
189 |
+
/******/ if (typeof window === 'object') return window;
|
190 |
+
/******/ }
|
191 |
+
/******/ })();
|
192 |
+
/******/ })();
|
193 |
+
/******/
|
194 |
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
195 |
+
/******/ (() => {
|
196 |
+
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
197 |
+
/******/ })();
|
198 |
+
/******/
|
199 |
+
/******/ /* webpack/runtime/make namespace object */
|
200 |
+
/******/ (() => {
|
201 |
+
/******/ // define __esModule on exports
|
202 |
+
/******/ __webpack_require__.r = (exports) => {
|
203 |
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
204 |
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
205 |
+
/******/ }
|
206 |
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
207 |
+
/******/ };
|
208 |
+
/******/ })();
|
209 |
+
/******/
|
210 |
+
/******/ /* webpack/runtime/publicPath */
|
211 |
+
/******/ (() => {
|
212 |
+
/******/ var scriptUrl;
|
213 |
+
/******/ if (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + "";
|
214 |
+
/******/ var document = __webpack_require__.g.document;
|
215 |
+
/******/ if (!scriptUrl && document) {
|
216 |
+
/******/ if (document.currentScript)
|
217 |
+
/******/ scriptUrl = document.currentScript.src
|
218 |
+
/******/ if (!scriptUrl) {
|
219 |
+
/******/ var scripts = document.getElementsByTagName("script");
|
220 |
+
/******/ if(scripts.length) scriptUrl = scripts[scripts.length - 1].src
|
221 |
+
/******/ }
|
222 |
+
/******/ }
|
223 |
+
/******/ // When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration
|
224 |
+
/******/ // or pass an empty string ("") and set the __webpack_public_path__ variable from your code to use your own logic.
|
225 |
+
/******/ if (!scriptUrl) throw new Error("Automatic publicPath is not supported in this browser");
|
226 |
+
/******/ scriptUrl = scriptUrl.replace(/#.*$/, "").replace(/\?.*$/, "").replace(/\/[^\/]+$/, "/");
|
227 |
+
/******/ __webpack_require__.p = scriptUrl;
|
228 |
+
/******/ })();
|
229 |
+
/******/
|
230 |
+
/************************************************************************/
|
231 |
+
var __webpack_exports__ = {};
|
232 |
+
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
|
233 |
+
(() => {
|
234 |
+
__webpack_require__.r(__webpack_exports__);
|
235 |
+
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(307);
|
236 |
+
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
|
237 |
+
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(818);
|
238 |
+
/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__);
|
239 |
+
/* harmony import */ var _wordpress_plugins__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(817);
|
240 |
+
/* harmony import */ var _wordpress_plugins__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_plugins__WEBPACK_IMPORTED_MODULE_2__);
|
241 |
+
/* harmony import */ var _modal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(93);
|
242 |
+
|
243 |
+
|
244 |
+
|
245 |
+
|
246 |
+
const unsubscribe = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_1__.subscribe)(() => {
|
247 |
+
const currentSidebar = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_1__.select)('core/interface').getActiveComplementaryArea('core/edit-site');
|
248 |
+
|
249 |
+
if (currentSidebar === 'edit-site/global-styles') {
|
250 |
+
unsubscribe(); // Hide the welcome guide modal, so it doesn't conflict with our modal.
|
251 |
+
|
252 |
+
(0,_wordpress_data__WEBPACK_IMPORTED_MODULE_1__.dispatch)('core/preferences').set('core/edit-site', 'welcomeGuideStyles', false);
|
253 |
+
(0,_wordpress_plugins__WEBPACK_IMPORTED_MODULE_2__.registerPlugin)('wpcom-global-styles', {
|
254 |
+
render: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_modal__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z, null)
|
255 |
+
});
|
256 |
+
}
|
257 |
+
});
|
258 |
+
})();
|
259 |
+
|
260 |
+
window.EditingToolkit = __webpack_exports__;
|
261 |
+
/******/ })()
|
262 |
+
;
|
wpcom-global-styles/dist/wpcom-global-styles.min.js
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
(()=>{"use strict";var e={612:()=>{},93:(e,t,o)=>{o.d(t,{Z:()=>n});var r=o(307),s=o(609),l=o(736),a=(o(196),o(731));o(612);const __=l.__,n=()=>{const[e,t]=(0,r.useState)(!0);if(!e)return null;const o=new URLSearchParams(window.location.search),l=Object.fromEntries(o.entries()),{origin:n}=l,i=["http://calypso.localhost:3000","https://wpcalypso.wordpress.com","https://horizon.wordpress.com"].includes(n)?n:"https://wordpress.com";return(0,r.createElement)(s.Modal,{className:"wpcom-global-styles-modal",open:e,onRequestClose:()=>t(!1)},(0,r.createElement)("div",{className:"wpcom-global-styles-modal__text"},(0,r.createElement)("h1",{className:"wpcom-global-styles-modal__heading"},__("A powerful new way to style your site","full-site-editing")),(0,r.createElement)("p",{className:"wpcom-global-styles-modal__description"},__("Change all of your site's fonts, colors and more. Available on any paid plan.","full-site-editing")),(0,r.createElement)("div",{className:"wpcom-global-styles-modal__actions"},(0,r.createElement)(s.Button,{variant:"secondary",onClick:()=>t(!1)},__("Try it out","full-site-editing")),(0,r.createElement)(s.Button,{variant:"primary",href:`${i}/plans/${window._currentSiteId??""}`,target:"_top"},__("Upgrade plan","full-site-editing")))),(0,r.createElement)("div",{className:"wpcom-global-styles-modal__image"},(0,r.createElement)("img",{src:a,alt:""})))}},731:(e,t,o)=>{e.exports=o.p+"images/image-193d312dedf57cb6412f.svg"},196:e=>{e.exports=window.React},609:e=>{e.exports=window.wp.components},818:e=>{e.exports=window.wp.data},307:e=>{e.exports=window.wp.element},736:e=>{e.exports=window.wp.i18n},817:e=>{e.exports=window.wp.plugins}},t={};function o(r){var s=t[r];if(void 0!==s)return s.exports;var l=t[r]={exports:{}};return e[r](l,l.exports,o),l.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;o.g.importScripts&&(e=o.g.location+"");var t=o.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName("script");r.length&&(e=r[r.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=e})();var r={};(()=>{o.r(r);var e=o(307),t=o(818),s=o(817),l=o(93);const a=(0,t.subscribe)((()=>{"edit-site/global-styles"===(0,t.select)("core/interface").getActiveComplementaryArea("core/edit-site")&&(a(),(0,t.dispatch)("core/preferences").set("core/edit-site","welcomeGuideStyles",!1),(0,s.registerPlugin)("wpcom-global-styles",{render:()=>(0,e.createElement)(l.Z,null)}))}))})(),window.EditingToolkit=r})();
|
2 |
+
//# sourceMappingURL=wpcom-global-styles.min.js.map
|
wpcom-global-styles/dist/wpcom-global-styles.rtl.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
@font-face{font-display:swap;font-family:Recoleta;font-weight:400;src:url(https://s1.wp.com/i/fonts/recoleta/400.woff2) format("woff2"),url(https://s1.wp.com/i/fonts/recoleta/400.woff) format("woff")}.wp-brand-font{font-family:"Noto Serif",Georgia,Times New Roman,Times,serif;font-weight:400}[lang*=af] .wp-brand-font,[lang*=ca] .wp-brand-font,[lang*=cs] .wp-brand-font,[lang*=da] .wp-brand-font,[lang*=de] .wp-brand-font,[lang*=en] .wp-brand-font,[lang*=es] .wp-brand-font,[lang*=eu] .wp-brand-font,[lang*=fi] .wp-brand-font,[lang*=fr] .wp-brand-font,[lang*=gl] .wp-brand-font,[lang*=hr] .wp-brand-font,[lang*=hu] .wp-brand-font,[lang*=id] .wp-brand-font,[lang*=is] .wp-brand-font,[lang*=it] .wp-brand-font,[lang*=lv] .wp-brand-font,[lang*=mt] .wp-brand-font,[lang*=nb] .wp-brand-font,[lang*=nl] .wp-brand-font,[lang*=pl] .wp-brand-font,[lang*=pt] .wp-brand-font,[lang*=ro] .wp-brand-font,[lang*=ru] .wp-brand-font,[lang*=sk] .wp-brand-font,[lang*=sl] .wp-brand-font,[lang*=sq] .wp-brand-font,[lang*=sr] .wp-brand-font,[lang*=sv] .wp-brand-font,[lang*=sw] .wp-brand-font,[lang*=tr] .wp-brand-font,[lang*=uz] .wp-brand-font{font-family:Recoleta,"Noto Serif",Georgia,Times New Roman,Times,serif}.wpcom-global-styles-modal .components-modal__content{display:flex;flex-direction:column-reverse;justify-content:flex-end;margin-top:0;padding:0}@media(min-width:600px){.wpcom-global-styles-modal .components-modal__content{flex-direction:row;justify-content:flex-start}}.wpcom-global-styles-modal .components-modal__header{height:auto;position:absolute}.wpcom-global-styles-modal .components-modal__header .components-button{top:16px}.wpcom-global-styles-modal .wpcom-global-styles-modal__image,.wpcom-global-styles-modal .wpcom-global-styles-modal__text{width:100%}@media(min-width:600px){.wpcom-global-styles-modal .wpcom-global-styles-modal__image,.wpcom-global-styles-modal .wpcom-global-styles-modal__text{max-width:380px;width:auto}}.wpcom-global-styles-modal .wpcom-global-styles-modal__text{display:flex;flex-direction:column;padding:64px 48px}.wpcom-global-styles-modal .wpcom-global-styles-modal__heading{font-family:Recoleta,"Noto Serif",Georgia,Times New Roman,Times,serif;font-size:2rem;font-weight:400;line-height:40px;margin-bottom:16px;margin-top:0}.wpcom-global-styles-modal .wpcom-global-styles-modal__description{font-size:1rem;line-height:24px;margin-bottom:32px;margin-top:0}.wpcom-global-styles-modal .wpcom-global-styles-modal__actions{display:flex;gap:16px;justify-content:center;margin-top:auto}.wpcom-global-styles-modal .wpcom-global-styles-modal__actions .components-button{flex-grow:1;justify-content:center}.wpcom-global-styles-modal .wpcom-global-styles-modal__image{background-color:#d0cce3;display:flex;justify-content:flex-end;padding:64px 64px 64px 0}.wpcom-global-styles-modal .wpcom-global-styles-modal__image img{width:100%}
|
wpcom-global-styles/image.svg
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<svg width="318" height="224" viewBox="0 0 318 224" fill="none" xmlns="http://www.w3.org/2000/svg">
|
2 |
+
<rect x="0.5" width="179.5" height="64" rx="2" fill="white"/>
|
3 |
+
<path d="M38.6914 38.0117L33.6055 24.0781H31.9297L26.8906 37.7422C26.6484 38.4219 26.4258 38.9336 26.2227 39.2773C26.0273 39.6211 25.793 39.8633 25.5195 40.0039C25.2461 40.1445 24.8672 40.2461 24.3828 40.3086V41H29.4688V40.3086C28.8672 40.2305 28.4297 40.1172 28.1562 39.9688C27.8906 39.8203 27.7578 39.5781 27.7578 39.2422C27.7656 38.9062 27.8789 38.4258 28.0977 37.8008L32.1289 26.0938H31.8242L36.0078 38C36.2109 38.5625 36.3047 39 36.2891 39.3125C36.2812 39.6172 36.1445 39.8438 35.8789 39.9922C35.6133 40.1328 35.1875 40.2383 34.6016 40.3086V41H41.0703V40.3086C40.625 40.2461 40.2656 40.1523 39.9922 40.0273C39.7188 39.8945 39.4883 39.6758 39.3008 39.3711C39.1133 39.0586 38.9102 38.6055 38.6914 38.0117ZM28.5664 35.0586H36.1016L35.7734 34.168H28.8945L28.5664 35.0586ZM45.3297 41.2344C46.1891 41.2344 46.9508 41.0664 47.6148 40.7305C48.2867 40.3945 48.7789 39.9922 49.0914 39.5234C49.1695 39.8828 49.3102 40.1836 49.5133 40.4258C49.7242 40.668 49.982 40.8555 50.2867 40.9883C50.5914 41.1133 50.9391 41.1758 51.3297 41.1758C51.7359 41.1758 52.0992 41.1211 52.4195 41.0117C52.7398 40.9023 52.9937 40.7812 53.1812 40.6484V40.0156C53.0172 40.0859 52.8102 40.1211 52.5602 40.1211C52.2086 40.1211 51.9078 40.0117 51.6578 39.793C51.4156 39.5742 51.2945 39.2031 51.2945 38.6797V32.7852C51.2945 31.5508 50.9 30.6445 50.1109 30.0664C49.3297 29.4805 48.2867 29.1875 46.982 29.1875C46.1148 29.1875 45.3258 29.3008 44.6148 29.5273C43.9117 29.7539 43.3492 30.0664 42.9273 30.4648C42.5055 30.8633 42.2945 31.3242 42.2945 31.8477C42.2945 32.2148 42.4195 32.5195 42.6695 32.7617C42.9273 32.9961 43.232 33.1133 43.5836 33.1133C43.9508 33.1133 44.2594 32.9961 44.5094 32.7617C44.7594 32.5273 44.8844 32.2383 44.8844 31.8945C44.8844 31.5508 44.7672 31.2578 44.5328 31.0156C44.2984 30.7734 44.0211 30.6523 43.7008 30.6523C43.4039 30.6523 43.1422 30.7891 42.9156 31.0625C42.6891 31.3281 42.5719 31.6562 42.5641 32.0469H43.0328C43.1266 31.6484 43.3219 31.3125 43.6187 31.0391C43.9156 30.7578 44.2828 30.5469 44.7203 30.4062C45.1578 30.2578 45.6383 30.1836 46.1617 30.1836C47.0133 30.1836 47.7047 30.3984 48.2359 30.8281C48.7672 31.2578 49.0328 32.0078 49.0328 33.0781V38.8086C48.775 39.1914 48.4273 39.4922 47.9898 39.7109C47.5602 39.9219 47.0719 40.0273 46.525 40.0273C45.8766 40.0273 45.3375 39.8438 44.9078 39.4766C44.4859 39.1016 44.275 38.582 44.275 37.918C44.275 37.2617 44.5094 36.7305 44.9781 36.3242C45.4547 35.9102 46.2789 35.5703 47.4508 35.3047L49.9469 34.7656V33.9219L46.4078 34.6953C45.3531 34.9219 44.4937 35.1992 43.8297 35.5273C43.1734 35.8555 42.693 36.25 42.3883 36.7109C42.0836 37.1641 41.9312 37.6992 41.9312 38.3164C41.9312 39.1758 42.2555 39.8789 42.9039 40.4258C43.5523 40.9648 44.3609 41.2344 45.3297 41.2344Z" fill="black"/>
|
4 |
+
<circle cx="152" cy="24" r="4" fill="#264447"/>
|
5 |
+
<circle cx="152" cy="40" r="4" fill="#FAE3CA"/>
|
6 |
+
<rect x="196" width="179.5" height="64" rx="3" fill="#FAE3CA"/>
|
7 |
+
<path d="M222.83 41H220.614L227.023 23.5455H229.205L235.614 41H233.398L228.182 26.3068H228.045L222.83 41ZM223.648 34.1818H232.58V36.0568H223.648V34.1818ZM241.812 41.3068C240.982 41.3068 240.23 41.1506 239.553 40.8381C238.877 40.5199 238.34 40.0625 237.943 39.4659C237.545 38.8636 237.346 38.1364 237.346 37.2841C237.346 36.5341 237.494 35.9261 237.789 35.4602C238.085 34.9886 238.48 34.6193 238.974 34.3523C239.468 34.0852 240.014 33.8864 240.61 33.7557C241.212 33.6193 241.818 33.5114 242.426 33.4318C243.221 33.3295 243.866 33.2528 244.36 33.2017C244.86 33.1449 245.224 33.0511 245.451 32.9205C245.684 32.7898 245.801 32.5625 245.801 32.2386V32.1705C245.801 31.3295 245.57 30.6761 245.11 30.2102C244.656 29.7443 243.965 29.5114 243.039 29.5114C242.079 29.5114 241.326 29.7216 240.781 30.142C240.235 30.5625 239.852 31.0114 239.63 31.4886L237.721 30.8068C238.062 30.0114 238.516 29.392 239.085 28.9489C239.659 28.5 240.284 28.1875 240.96 28.0114C241.641 27.8295 242.312 27.7386 242.971 27.7386C243.391 27.7386 243.874 27.7898 244.42 27.892C244.971 27.9886 245.502 28.1903 246.014 28.4972C246.531 28.804 246.96 29.267 247.301 29.8864C247.641 30.5057 247.812 31.3352 247.812 32.375V41H245.801V39.2273H245.698C245.562 39.5114 245.335 39.8153 245.016 40.1392C244.698 40.4631 244.275 40.7386 243.747 40.9659C243.218 41.1932 242.573 41.3068 241.812 41.3068ZM242.119 39.5C242.914 39.5 243.585 39.3438 244.13 39.0312C244.681 38.7188 245.096 38.3153 245.374 37.821C245.659 37.3267 245.801 36.8068 245.801 36.2614V34.4205C245.715 34.5227 245.528 34.6165 245.238 34.7017C244.954 34.7812 244.624 34.8523 244.249 34.9148C243.88 34.9716 243.519 35.0227 243.167 35.0682C242.82 35.108 242.539 35.142 242.323 35.1705C241.801 35.2386 241.312 35.3494 240.857 35.5028C240.409 35.6506 240.045 35.875 239.766 36.1761C239.494 36.4716 239.357 36.875 239.357 37.3864C239.357 38.0852 239.616 38.6136 240.133 38.9716C240.656 39.3239 241.318 39.5 242.119 39.5Z" fill="black"/>
|
8 |
+
<rect x="0.5" y="80" width="179.5" height="64" rx="3" fill="black"/>
|
9 |
+
<path d="M27.3295 121H25.1136L31.5227 103.545H33.7045L40.1136 121H37.8977L32.6818 106.307H32.5455L27.3295 121ZM28.1477 114.182H37.0795V116.057H28.1477V114.182ZM46.3119 121.307C45.4824 121.307 44.7295 121.151 44.0534 120.838C43.3773 120.52 42.8403 120.062 42.4426 119.466C42.0449 118.864 41.846 118.136 41.846 117.284C41.846 116.534 41.9937 115.926 42.2892 115.46C42.5847 114.989 42.9795 114.619 43.4739 114.352C43.9682 114.085 44.5136 113.886 45.1102 113.756C45.7125 113.619 46.3176 113.511 46.9256 113.432C47.721 113.33 48.3659 113.253 48.8602 113.202C49.3602 113.145 49.7239 113.051 49.9511 112.92C50.1841 112.79 50.3006 112.562 50.3006 112.239V112.17C50.3006 111.33 50.0705 110.676 49.6102 110.21C49.1557 109.744 48.4653 109.511 47.5392 109.511C46.579 109.511 45.8261 109.722 45.2807 110.142C44.7352 110.562 44.3517 111.011 44.1301 111.489L42.221 110.807C42.5619 110.011 43.0165 109.392 43.5847 108.949C44.1585 108.5 44.7835 108.187 45.4597 108.011C46.1415 107.83 46.8119 107.739 47.471 107.739C47.8915 107.739 48.3744 107.79 48.9199 107.892C49.471 107.989 50.0023 108.19 50.5136 108.497C51.0307 108.804 51.4597 109.267 51.8006 109.886C52.1415 110.506 52.3119 111.335 52.3119 112.375V121H50.3006V119.227H50.1983C50.0619 119.511 49.8347 119.815 49.5165 120.139C49.1983 120.463 48.775 120.739 48.2466 120.966C47.7182 121.193 47.0733 121.307 46.3119 121.307ZM46.6187 119.5C47.4142 119.5 48.0847 119.344 48.6301 119.031C49.1812 118.719 49.596 118.315 49.8744 117.821C50.1585 117.327 50.3006 116.807 50.3006 116.261V114.42C50.2153 114.523 50.0278 114.616 49.7381 114.702C49.454 114.781 49.1244 114.852 48.7494 114.915C48.3801 114.972 48.0193 115.023 47.667 115.068C47.3205 115.108 47.0392 115.142 46.8233 115.17C46.3006 115.239 45.8119 115.349 45.3574 115.503C44.9085 115.651 44.5449 115.875 44.2665 116.176C43.9937 116.472 43.8574 116.875 43.8574 117.386C43.8574 118.085 44.1159 118.614 44.633 118.972C45.1557 119.324 45.8176 119.5 46.6187 119.5Z" fill="white"/>
|
10 |
+
<circle cx="152" cy="104" r="4" fill="white"/>
|
11 |
+
<circle cx="152" cy="120" r="4" fill="#DE7700"/>
|
12 |
+
<rect x="196" y="80" width="179.5" height="64" rx="3" fill="#424CBF"/>
|
13 |
+
<path d="M234.191 118.012L229.105 104.078H227.43L222.391 117.742C222.148 118.422 221.926 118.934 221.723 119.277C221.527 119.621 221.293 119.863 221.02 120.004C220.746 120.145 220.367 120.246 219.883 120.309V121H224.969V120.309C224.367 120.23 223.93 120.117 223.656 119.969C223.391 119.82 223.258 119.578 223.258 119.242C223.266 118.906 223.379 118.426 223.598 117.801L227.629 106.094H227.324L231.508 118C231.711 118.562 231.805 119 231.789 119.312C231.781 119.617 231.645 119.844 231.379 119.992C231.113 120.133 230.688 120.238 230.102 120.309V121H236.57V120.309C236.125 120.246 235.766 120.152 235.492 120.027C235.219 119.895 234.988 119.676 234.801 119.371C234.613 119.059 234.41 118.605 234.191 118.012ZM224.066 115.059H231.602L231.273 114.168H224.395L224.066 115.059ZM240.83 121.234C241.689 121.234 242.451 121.066 243.115 120.73C243.787 120.395 244.279 119.992 244.591 119.523C244.67 119.883 244.81 120.184 245.013 120.426C245.224 120.668 245.482 120.855 245.787 120.988C246.091 121.113 246.439 121.176 246.83 121.176C247.236 121.176 247.599 121.121 247.92 121.012C248.24 120.902 248.494 120.781 248.681 120.648V120.016C248.517 120.086 248.31 120.121 248.06 120.121C247.709 120.121 247.408 120.012 247.158 119.793C246.916 119.574 246.795 119.203 246.795 118.68V112.785C246.795 111.551 246.4 110.645 245.611 110.066C244.83 109.48 243.787 109.188 242.482 109.188C241.615 109.188 240.826 109.301 240.115 109.527C239.412 109.754 238.849 110.066 238.427 110.465C238.005 110.863 237.795 111.324 237.795 111.848C237.795 112.215 237.92 112.52 238.17 112.762C238.427 112.996 238.732 113.113 239.084 113.113C239.451 113.113 239.759 112.996 240.009 112.762C240.259 112.527 240.384 112.238 240.384 111.895C240.384 111.551 240.267 111.258 240.033 111.016C239.798 110.773 239.521 110.652 239.201 110.652C238.904 110.652 238.642 110.789 238.416 111.062C238.189 111.328 238.072 111.656 238.064 112.047H238.533C238.627 111.648 238.822 111.312 239.119 111.039C239.416 110.758 239.783 110.547 240.22 110.406C240.658 110.258 241.138 110.184 241.662 110.184C242.513 110.184 243.205 110.398 243.736 110.828C244.267 111.258 244.533 112.008 244.533 113.078V118.809C244.275 119.191 243.927 119.492 243.49 119.711C243.06 119.922 242.572 120.027 242.025 120.027C241.377 120.027 240.837 119.844 240.408 119.477C239.986 119.102 239.775 118.582 239.775 117.918C239.775 117.262 240.009 116.73 240.478 116.324C240.955 115.91 241.779 115.57 242.951 115.305L245.447 114.766V113.922L241.908 114.695C240.853 114.922 239.994 115.199 239.33 115.527C238.673 115.855 238.193 116.25 237.888 116.711C237.584 117.164 237.431 117.699 237.431 118.316C237.431 119.176 237.755 119.879 238.404 120.426C239.052 120.965 239.861 121.234 240.83 121.234Z" fill="white"/>
|
14 |
+
<rect x="0.5" y="160" width="179.5" height="64" rx="3" fill="#64589E"/>
|
15 |
+
<path d="M27.3295 201H25.1136L31.5227 183.545H33.7045L40.1136 201H37.8977L32.6818 186.307H32.5455L27.3295 201ZM28.1477 194.182H37.0795V196.057H28.1477V194.182ZM46.3119 201.307C45.4824 201.307 44.7295 201.151 44.0534 200.838C43.3773 200.52 42.8403 200.062 42.4426 199.466C42.0449 198.864 41.846 198.136 41.846 197.284C41.846 196.534 41.9937 195.926 42.2892 195.46C42.5847 194.989 42.9795 194.619 43.4739 194.352C43.9682 194.085 44.5136 193.886 45.1102 193.756C45.7125 193.619 46.3176 193.511 46.9256 193.432C47.721 193.33 48.3659 193.253 48.8602 193.202C49.3602 193.145 49.7239 193.051 49.9511 192.92C50.1841 192.79 50.3006 192.562 50.3006 192.239V192.17C50.3006 191.33 50.0705 190.676 49.6102 190.21C49.1557 189.744 48.4653 189.511 47.5392 189.511C46.579 189.511 45.8261 189.722 45.2807 190.142C44.7352 190.562 44.3517 191.011 44.1301 191.489L42.221 190.807C42.5619 190.011 43.0165 189.392 43.5847 188.949C44.1585 188.5 44.7835 188.187 45.4597 188.011C46.1415 187.83 46.8119 187.739 47.471 187.739C47.8915 187.739 48.3744 187.79 48.9199 187.892C49.471 187.989 50.0023 188.19 50.5136 188.497C51.0307 188.804 51.4597 189.267 51.8006 189.886C52.1415 190.506 52.3119 191.335 52.3119 192.375V201H50.3006V199.227H50.1983C50.0619 199.511 49.8347 199.815 49.5165 200.139C49.1983 200.463 48.775 200.739 48.2466 200.966C47.7182 201.193 47.0733 201.307 46.3119 201.307ZM46.6187 199.5C47.4142 199.5 48.0847 199.344 48.6301 199.031C49.1812 198.719 49.596 198.315 49.8744 197.821C50.1585 197.327 50.3006 196.807 50.3006 196.261V194.42C50.2153 194.523 50.0278 194.616 49.7381 194.702C49.454 194.781 49.1244 194.852 48.7494 194.915C48.3801 194.972 48.0193 195.023 47.667 195.068C47.3205 195.108 47.0392 195.142 46.8233 195.17C46.3006 195.239 45.8119 195.349 45.3574 195.503C44.9085 195.651 44.5449 195.875 44.2665 196.176C43.9937 196.472 43.8574 196.875 43.8574 197.386C43.8574 198.085 44.1159 198.614 44.633 198.972C45.1557 199.324 45.8176 199.5 46.6187 199.5Z" fill="white"/>
|
16 |
+
<circle cx="152" cy="184" r="4" fill="white"/>
|
17 |
+
<circle cx="152" cy="200" r="4" fill="black"/>
|
18 |
+
<rect x="196" y="160" width="179.5" height="64" rx="3" fill="#B5AFD0"/>
|
19 |
+
<path d="M234.191 198.012L229.105 184.078H227.43L222.391 197.742C222.148 198.422 221.926 198.934 221.723 199.277C221.527 199.621 221.293 199.863 221.02 200.004C220.746 200.145 220.367 200.246 219.883 200.309V201H224.969V200.309C224.367 200.23 223.93 200.117 223.656 199.969C223.391 199.82 223.258 199.578 223.258 199.242C223.266 198.906 223.379 198.426 223.598 197.801L227.629 186.094H227.324L231.508 198C231.711 198.562 231.805 199 231.789 199.312C231.781 199.617 231.645 199.844 231.379 199.992C231.113 200.133 230.688 200.238 230.102 200.309V201H236.57V200.309C236.125 200.246 235.766 200.152 235.492 200.027C235.219 199.895 234.988 199.676 234.801 199.371C234.613 199.059 234.41 198.605 234.191 198.012ZM224.066 195.059H231.602L231.273 194.168H224.395L224.066 195.059ZM240.83 201.234C241.689 201.234 242.451 201.066 243.115 200.73C243.787 200.395 244.279 199.992 244.591 199.523C244.67 199.883 244.81 200.184 245.013 200.426C245.224 200.668 245.482 200.855 245.787 200.988C246.091 201.113 246.439 201.176 246.83 201.176C247.236 201.176 247.599 201.121 247.92 201.012C248.24 200.902 248.494 200.781 248.681 200.648V200.016C248.517 200.086 248.31 200.121 248.06 200.121C247.709 200.121 247.408 200.012 247.158 199.793C246.916 199.574 246.795 199.203 246.795 198.68V192.785C246.795 191.551 246.4 190.645 245.611 190.066C244.83 189.48 243.787 189.188 242.482 189.188C241.615 189.188 240.826 189.301 240.115 189.527C239.412 189.754 238.849 190.066 238.427 190.465C238.005 190.863 237.795 191.324 237.795 191.848C237.795 192.215 237.92 192.52 238.17 192.762C238.427 192.996 238.732 193.113 239.084 193.113C239.451 193.113 239.759 192.996 240.009 192.762C240.259 192.527 240.384 192.238 240.384 191.895C240.384 191.551 240.267 191.258 240.033 191.016C239.798 190.773 239.521 190.652 239.201 190.652C238.904 190.652 238.642 190.789 238.416 191.062C238.189 191.328 238.072 191.656 238.064 192.047H238.533C238.627 191.648 238.822 191.312 239.119 191.039C239.416 190.758 239.783 190.547 240.22 190.406C240.658 190.258 241.138 190.184 241.662 190.184C242.513 190.184 243.205 190.398 243.736 190.828C244.267 191.258 244.533 192.008 244.533 193.078V198.809C244.275 199.191 243.927 199.492 243.49 199.711C243.06 199.922 242.572 200.027 242.025 200.027C241.377 200.027 240.837 199.844 240.408 199.477C239.986 199.102 239.775 198.582 239.775 197.918C239.775 197.262 240.009 196.73 240.478 196.324C240.955 195.91 241.779 195.57 242.951 195.305L245.447 194.766V193.922L241.908 194.695C240.853 194.922 239.994 195.199 239.33 195.527C238.673 195.855 238.193 196.25 237.888 196.711C237.584 197.164 237.431 197.699 237.431 198.316C237.431 199.176 237.755 199.879 238.404 200.426C239.052 200.965 239.861 201.234 240.83 201.234Z" fill="#2B2647"/>
|
20 |
+
</svg>
|
wpcom-global-styles/index.js
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { dispatch, select, subscribe } from '@wordpress/data';
|
2 |
+
import { registerPlugin } from '@wordpress/plugins';
|
3 |
+
import GlobalStylesModal from './modal';
|
4 |
+
|
5 |
+
const unsubscribe = subscribe( () => {
|
6 |
+
const currentSidebar = select( 'core/interface' ).getActiveComplementaryArea( 'core/edit-site' );
|
7 |
+
if ( currentSidebar === 'edit-site/global-styles' ) {
|
8 |
+
unsubscribe();
|
9 |
+
|
10 |
+
// Hide the welcome guide modal, so it doesn't conflict with our modal.
|
11 |
+
dispatch( 'core/preferences' ).set( 'core/edit-site', 'welcomeGuideStyles', false );
|
12 |
+
|
13 |
+
registerPlugin( 'wpcom-global-styles', {
|
14 |
+
render: () => <GlobalStylesModal />,
|
15 |
+
} );
|
16 |
+
}
|
17 |
+
} );
|
wpcom-global-styles/index.php
ADDED
@@ -0,0 +1,79 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Limit Global Styles on WP.com to paid plans.
|
4 |
+
*
|
5 |
+
* @package full-site-editing-plugin
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Checks if Global Styles should be limited on the given site.
|
10 |
+
*
|
11 |
+
* @param int $blog_id Blog ID.
|
12 |
+
* @return bool Whether Global Styles are limited.
|
13 |
+
*/
|
14 |
+
function wpcom_should_limit_global_styles( $blog_id = 0 ) {
|
15 |
+
if ( ! $blog_id ) {
|
16 |
+
$blog_id = get_current_blog_id();
|
17 |
+
}
|
18 |
+
|
19 |
+
// Do not limit Global Styles on Atomic sites for now, because blog stickers are not exposed
|
20 |
+
// to these sites and the project is still in a development stage that requires sites to have
|
21 |
+
// a certain blog sticker before restricting the feature. This is a temporary check that will
|
22 |
+
// be removed as part of the public launch.
|
23 |
+
if ( ! defined( 'IS_WPCOM' ) || ! IS_WPCOM ) {
|
24 |
+
return false;
|
25 |
+
}
|
26 |
+
|
27 |
+
// Do not limit Global Styles on sites created before we made it a paid feature. This cutoff
|
28 |
+
// blog ID needs to be updated as part of the public launch.
|
29 |
+
if ( $blog_id < 210494207 ) {
|
30 |
+
return false;
|
31 |
+
}
|
32 |
+
|
33 |
+
if ( wpcom_site_has_feature( WPCOM_Features::GLOBAL_STYLES, $blog_id ) ) {
|
34 |
+
return false;
|
35 |
+
}
|
36 |
+
|
37 |
+
// During the development stage, we only limit Global Styles on sites that have opted in. This
|
38 |
+
// is a temporary check that will be removed as part of the public launch.
|
39 |
+
return has_blog_sticker( 'wpcom-limit-global-styles', $blog_id );
|
40 |
+
}
|
41 |
+
|
42 |
+
/**
|
43 |
+
* Enqueues the WP.com Global Styles scripts and styles.
|
44 |
+
*
|
45 |
+
* @return void
|
46 |
+
*/
|
47 |
+
function wpcom_global_styles_enqueue_scripts_and_styles() {
|
48 |
+
$screen = get_current_screen();
|
49 |
+
if ( ! $screen || 'site-editor' !== $screen->id ) {
|
50 |
+
return;
|
51 |
+
}
|
52 |
+
|
53 |
+
if ( ! wpcom_should_limit_global_styles() ) {
|
54 |
+
return;
|
55 |
+
}
|
56 |
+
|
57 |
+
$asset_file = plugin_dir_path( __FILE__ ) . 'dist/wpcom-global-styles.asset.php';
|
58 |
+
$asset = file_exists( $asset_file )
|
59 |
+
? require $asset_file
|
60 |
+
: null;
|
61 |
+
$dependencies = $asset['dependencies'] ?? array();
|
62 |
+
$version = $asset['version'] ?? filemtime( plugin_dir_path( __FILE__ ) . 'dist/wpcom-global-styles.min.js' );
|
63 |
+
|
64 |
+
wp_enqueue_script(
|
65 |
+
'wpcom-global-styles-editor',
|
66 |
+
plugins_url( 'dist/wpcom-global-styles.min.js', __FILE__ ),
|
67 |
+
$dependencies,
|
68 |
+
$version,
|
69 |
+
true
|
70 |
+
);
|
71 |
+
wp_set_script_translations( 'wpcom-global-styles-editor', 'full-site-editing' );
|
72 |
+
wp_enqueue_style(
|
73 |
+
'wpcom-global-styles-editor',
|
74 |
+
plugins_url( 'dist/wpcom-global-styles.css', __FILE__ ),
|
75 |
+
array(),
|
76 |
+
filemtime( plugin_dir_path( __FILE__ ) . 'dist/wpcom-global-styles.css' )
|
77 |
+
);
|
78 |
+
}
|
79 |
+
add_action( 'enqueue_block_editor_assets', 'wpcom_global_styles_enqueue_scripts_and_styles' );
|
wpcom-global-styles/modal.js
ADDED
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { Button, Modal } from '@wordpress/components';
|
2 |
+
import { useState } from '@wordpress/element';
|
3 |
+
import { __ } from '@wordpress/i18n';
|
4 |
+
import React from 'react';
|
5 |
+
import image from './image.svg';
|
6 |
+
|
7 |
+
import './modal.scss';
|
8 |
+
|
9 |
+
const GlobalStylesModal = () => {
|
10 |
+
const [ isVisible, setIsVisible ] = useState( true );
|
11 |
+
|
12 |
+
if ( ! isVisible ) {
|
13 |
+
return null;
|
14 |
+
}
|
15 |
+
|
16 |
+
const searchParams = new URLSearchParams( window.location.search );
|
17 |
+
const params = Object.fromEntries( searchParams.entries() );
|
18 |
+
const { origin } = params;
|
19 |
+
const calypsoDomain = [
|
20 |
+
'http://calypso.localhost:3000',
|
21 |
+
'https://wpcalypso.wordpress.com',
|
22 |
+
'https://horizon.wordpress.com',
|
23 |
+
].includes( origin )
|
24 |
+
? origin
|
25 |
+
: 'https://wordpress.com';
|
26 |
+
|
27 |
+
return (
|
28 |
+
<Modal
|
29 |
+
className="wpcom-global-styles-modal"
|
30 |
+
open={ isVisible }
|
31 |
+
onRequestClose={ () => setIsVisible( false ) }
|
32 |
+
>
|
33 |
+
<div className="wpcom-global-styles-modal__text">
|
34 |
+
<h1 className="wpcom-global-styles-modal__heading">
|
35 |
+
{ __( 'A powerful new way to style your site', 'full-site-editing' ) }
|
36 |
+
</h1>
|
37 |
+
<p className="wpcom-global-styles-modal__description">
|
38 |
+
{ __(
|
39 |
+
"Change all of your site's fonts, colors and more. Available on any paid plan.",
|
40 |
+
'full-site-editing'
|
41 |
+
) }
|
42 |
+
</p>
|
43 |
+
<div className="wpcom-global-styles-modal__actions">
|
44 |
+
<Button variant="secondary" onClick={ () => setIsVisible( false ) }>
|
45 |
+
{ __( 'Try it out', 'full-site-editing' ) }
|
46 |
+
</Button>
|
47 |
+
<Button
|
48 |
+
variant="primary"
|
49 |
+
href={ `${ calypsoDomain }/plans/${ window._currentSiteId ?? '' }` }
|
50 |
+
target="_top"
|
51 |
+
>
|
52 |
+
{ __( 'Upgrade plan', 'full-site-editing' ) }
|
53 |
+
</Button>
|
54 |
+
</div>
|
55 |
+
</div>
|
56 |
+
<div className="wpcom-global-styles-modal__image">
|
57 |
+
<img src={ image } alt="" />
|
58 |
+
</div>
|
59 |
+
</Modal>
|
60 |
+
);
|
61 |
+
};
|
62 |
+
|
63 |
+
export default GlobalStylesModal;
|
wpcom-global-styles/modal.scss
ADDED
@@ -0,0 +1,82 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
@import "@automattic/typography/styles/fonts";
|
2 |
+
@import "@wordpress/base-styles/breakpoints";
|
3 |
+
@import "@wordpress/base-styles/mixins";
|
4 |
+
|
5 |
+
.wpcom-global-styles-modal {
|
6 |
+
.components-modal__content {
|
7 |
+
padding: 0;
|
8 |
+
margin-top: 0;
|
9 |
+
display: flex;
|
10 |
+
flex-direction: column-reverse;
|
11 |
+
justify-content: flex-end;
|
12 |
+
|
13 |
+
@include break-small {
|
14 |
+
flex-direction: row;
|
15 |
+
justify-content: flex-start;
|
16 |
+
}
|
17 |
+
}
|
18 |
+
|
19 |
+
.components-modal__header {
|
20 |
+
height: auto;
|
21 |
+
position: absolute;
|
22 |
+
|
23 |
+
.components-button {
|
24 |
+
top: 16px;
|
25 |
+
}
|
26 |
+
}
|
27 |
+
|
28 |
+
.wpcom-global-styles-modal__text,
|
29 |
+
.wpcom-global-styles-modal__image {
|
30 |
+
width: 100%;
|
31 |
+
|
32 |
+
@include break-small {
|
33 |
+
width: auto;
|
34 |
+
max-width: 380px;
|
35 |
+
}
|
36 |
+
}
|
37 |
+
|
38 |
+
.wpcom-global-styles-modal__text {
|
39 |
+
padding: 64px 48px;
|
40 |
+
display: flex;
|
41 |
+
flex-direction: column;
|
42 |
+
}
|
43 |
+
|
44 |
+
.wpcom-global-styles-modal__heading {
|
45 |
+
margin-top: 0;
|
46 |
+
font-family: $brand-serif;
|
47 |
+
font-weight: 400;
|
48 |
+
font-size: 2rem;
|
49 |
+
line-height: 40px;
|
50 |
+
margin-bottom: 16px;
|
51 |
+
}
|
52 |
+
|
53 |
+
.wpcom-global-styles-modal__description {
|
54 |
+
font-size: 1rem;
|
55 |
+
line-height: 24px;
|
56 |
+
margin-top: 0;
|
57 |
+
margin-bottom: 32px;
|
58 |
+
}
|
59 |
+
|
60 |
+
.wpcom-global-styles-modal__actions {
|
61 |
+
display: flex;
|
62 |
+
justify-content: center;
|
63 |
+
gap: 16px;
|
64 |
+
margin-top: auto;
|
65 |
+
|
66 |
+
.components-button {
|
67 |
+
flex-grow: 1;
|
68 |
+
justify-content: center;
|
69 |
+
}
|
70 |
+
}
|
71 |
+
|
72 |
+
.wpcom-global-styles-modal__image {
|
73 |
+
background-color: #d0cce3;
|
74 |
+
padding: 64px 0 64px 64px;
|
75 |
+
display: flex;
|
76 |
+
justify-content: flex-end;
|
77 |
+
|
78 |
+
img {
|
79 |
+
width: 100%;
|
80 |
+
}
|
81 |
+
}
|
82 |
+
}
|