From e82c8e05b952b98ddaa5c3c07aa96757a7fef52e Mon Sep 17 00:00:00 2001 From: Bernie Reiter Date: Tue, 25 Feb 2020 16:49:33 +0600 Subject: [PATCH] FSE on WP.com: Initial explorations --- .circleci/config.yml | 4 +- client/landing/custom-editor/index.tsx | 18 ++ client/landing/custom-editor/section.ts | 8 + client/landing/custom-editor/tsconfig.json | 13 + client/landing/custom-editor/utils.ts | 110 ++++++++ client/package.json | 1 + client/server/pages/index.js | 2 + client/webpack.config.js | 1 + config/development.json | 1 + yarn.lock | 281 ++++++++++++++++++++- 10 files changed, 432 insertions(+), 7 deletions(-) create mode 100644 client/landing/custom-editor/index.tsx create mode 100644 client/landing/custom-editor/section.ts create mode 100644 client/landing/custom-editor/tsconfig.json create mode 100644 client/landing/custom-editor/utils.ts diff --git a/.circleci/config.yml b/.circleci/config.yml index d72e36abfcd433..830f6fa0ef5402 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -336,7 +336,9 @@ jobs: - prepare - run: name: TypeScript strict typecheck of individual subprojects - command: yarn run tsc --project client/landing/gutenboarding + command: | + yarn run tsc --project client/landing/custom-editor + && yarn run tsc --project client/landing/gutenboarding lint: <<: *defaults diff --git a/client/landing/custom-editor/index.tsx b/client/landing/custom-editor/index.tsx new file mode 100644 index 00000000000000..82e00bf9d1e635 --- /dev/null +++ b/client/landing/custom-editor/index.tsx @@ -0,0 +1,18 @@ +/** + * External dependencies + */ +import config from '../../config'; +import { initialize } from '@wordpress/edit-site'; + +/** + * Internal dependencies + */ +import './utils'; + +window.AppBoot = () => { + if ( ! config.isEnabled( 'custom-editor' ) ) { + window.location.href = '/'; + } else { + initialize( 'wpcom', {} ); + } +}; diff --git a/client/landing/custom-editor/section.ts b/client/landing/custom-editor/section.ts new file mode 100644 index 00000000000000..a846025de74e74 --- /dev/null +++ b/client/landing/custom-editor/section.ts @@ -0,0 +1,8 @@ +export const CUSTOM_EDITOR_SECTION_DEFINITION = { + name: 'custom-editor', + paths: [ '/custom-editor' ], + module: 'custom-editor', + secondary: false, + group: 'custom-editor', + enableLoggedOut: true, +}; diff --git a/client/landing/custom-editor/tsconfig.json b/client/landing/custom-editor/tsconfig.json new file mode 100644 index 00000000000000..49a618883dc0cb --- /dev/null +++ b/client/landing/custom-editor/tsconfig.json @@ -0,0 +1,13 @@ +{ + "extends": "@automattic/calypso-build/tsconfig", + "compilerOptions": { + // Disallow features that require cross-file information for emit. + // Must be used with babel typescript + "isolatedModules": true, + + "baseUrl": ".", + "paths": { + "*": [ "*", "../../*" ] + } + } +} diff --git a/client/landing/custom-editor/utils.ts b/client/landing/custom-editor/utils.ts new file mode 100644 index 00000000000000..04702c1b516f9f --- /dev/null +++ b/client/landing/custom-editor/utils.ts @@ -0,0 +1,110 @@ +/** + * External dependencies + */ +import apiFetch from '@wordpress/api-fetch'; +import wpcomRequest from 'wpcom-proxy-request'; + +/** + * A lot of the following is copied from D37093-code. + * Maybe we can move this code into Calypso `packages/`, parametrize it (e.g. apiFetch) + * and move into Calypso's `packages/wpcom-proxy-request`, or publish as a new npm for use on WP.com. + */ + +// FIXME -- quick'n'dirty setting of a few params +const _currentSiteId = 89417913; // @ockham's test site, replace with your own + +const wpApiSettings = { + root: 'https://public-api.wordpress.com/', +}; + +/** + * Normalizes the path for requests to the public API. + */ +function wpcomFetchNormalizePath( options ) { + if ( options.url && options.url.indexOf( wpApiSettings.root ) !== -1 ) { + options.path = options.url.replace( wpApiSettings.root, '' ); + delete options.url; + } + + if ( options.path ) { + // Ensures path starts with a slash. + if ( ! options.path.startsWith( '/' ) ) { + options.path = '/' + options.path; + } + + // Removes namespace from path. + if ( options.apiNamespace ) { + options.path = options.path.replace( '/' + options.apiNamespace, '' ); + } + } + + return options; +} + +/** + * Creates a fetch-like response. + */ +function wpcomFetchCreateFetchResponse( data, status, headers ) { + var fetchResponse; + var normalizedHeaders = {}; + for ( var header in headers ) { + normalizedHeaders[ header.toLowerCase() ] = headers[ header ]; + } + if ( Array.isArray( data ) ) { + fetchResponse = data.slice( 0 ); + } else { + fetchResponse = Object.assign( {}, data ); + } + fetchResponse.status = status; + fetchResponse.json = function() { + return Promise.resolve( data ); + }; + fetchResponse.headers = { + get: function( name ) { + return normalizedHeaders[ name && name.toLowerCase() ]; + }, + }; + return fetchResponse; +} + +/** + * Determines the namespace from the request path. + */ +function wpcomFetchSetNamespace( options, next ) { + if ( options.path && ! options.namespace ) { + var namespace = options.path.match( /^\/([a-z]+\/v?[0-9.]+)\// ); + if ( namespace ) { + options.apiNamespace = namespace[ 1 ]; + options.path = options.path.replace( '/' + options.apiNamespace, '' ); + } else { + // Defaults all requests to the wp/v2 namespace. + options.apiNamespace = 'wp/v2'; + } + } + console.log( 'post-norm options', options ); + return next( options, next ); +} + +/** + * Prefixes any non-global request endpoint to the site specific endpoint. + */ +function wpcomFetchAddSitePrefix( options, next ) { + if ( options.path && ! options.global && options.path.indexOf( '/sites/' ) === -1 ) { + options.path = '/sites/' + _currentSiteId + options.path; + } + return next( options, next ); +} + +// Register middlewares (last-registered runs first). +[ + wpcomFetchAddSitePrefix, + wpcomFetchSetNamespace, + function( options, next ) { + // Path needs to be normalized first. + return next( wpcomFetchNormalizePath( options ), next ); + }, +].forEach( function( middleware ) { + apiFetch.use( middleware ); +} ); + +apiFetch.setFetchHandler( wpcomRequest ); diff --git a/client/package.json b/client/package.json index f1eeedb041bf41..62697d7780e5ef 100644 --- a/client/package.json +++ b/client/package.json @@ -57,6 +57,7 @@ "@wordpress/data-controls": "^1.16.3", "@wordpress/dom": "^2.13.1", "@wordpress/edit-post": "^3.21.3", + "@wordpress/edit-site": "^1.11.6", "@wordpress/editor": "^9.20.3", "@wordpress/element": "^2.16.0", "@wordpress/format-library": "^1.22.3", diff --git a/client/server/pages/index.js b/client/server/pages/index.js index 086462a3675acc..250c8fb6b63cb7 100644 --- a/client/server/pages/index.js +++ b/client/server/pages/index.js @@ -44,6 +44,7 @@ import { logSectionResponse } from './analytics'; import analytics from 'server/lib/analytics'; import { getLanguage, filterLanguageRevisions } from 'lib/i18n-utils'; import { isWooOAuth2Client } from 'lib/oauth2-clients'; +import { CUSTOM_EDITOR_SECTION_DEFINITION } from 'landing/custom-editor/section'; import { GUTENBOARDING_SECTION_DEFINITION } from 'landing/gutenboarding/section'; import wooDnaConfig from 'jetpack-connect/woo-dna-config'; @@ -721,6 +722,7 @@ export default function pages() { handleSectionPath( LOGIN_SECTION_DEFINITION, '/log-in', 'entry-login' ); loginRouter( serverRouter( app, setUpRoute, null ) ); + handleSectionPath( CUSTOM_EDITOR_SECTION_DEFINITION, '/custom-editor', 'entry-custom-editor' ); handleSectionPath( GUTENBOARDING_SECTION_DEFINITION, '/new', 'entry-gutenboarding' ); // This is used to log to tracks Content Security Policy violation reports sent by browsers diff --git a/client/webpack.config.js b/client/webpack.config.js index 7b6ebe3ad12ac7..a5ff539e698b9e 100644 --- a/client/webpack.config.js +++ b/client/webpack.config.js @@ -151,6 +151,7 @@ const webpackConfig = { 'entry-domains-landing': [ path.join( __dirname, 'landing', 'domains' ) ], 'entry-login': [ path.join( __dirname, 'landing', 'login' ) ], 'entry-gutenboarding': [ path.join( __dirname, 'landing', 'gutenboarding' ) ], + 'entry-custom-editor': [ path.join( __dirname, 'landing', 'custom-editor' ) ], } ), mode: isDevelopment ? 'development' : 'production', devtool: process.env.SOURCEMAP || ( isDevelopment ? '#eval' : false ), diff --git a/config/development.json b/config/development.json index af4735a0ad8c05..b5980896275f01 100644 --- a/config/development.json +++ b/config/development.json @@ -39,6 +39,7 @@ "current-site/domain-warning": true, "current-site/notice": true, "current-site/stale-cart-notice": true, + "custom-editor": true, "desktop-promo": true, "devdocs": true, "devdocs/redirect-loggedout-homepage": true, diff --git a/yarn.lock b/yarn.lock index d1b65d62cbbf49..7acfac24ebcbbf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4812,6 +4812,51 @@ tinycolor2 "^1.4.1" traverse "^0.6.6" +"@wordpress/block-editor@^4.3.6": + version "4.3.6" + resolved "https://registry.yarnpkg.com/@wordpress/block-editor/-/block-editor-4.3.6.tgz#53f80fa4d44b467fc748cef07cc783900a3ac44b" + integrity sha512-+ARIj/+Ym1B86ZdUN28tbPTB+LnfGRNeVoN9OVaYU+biysw8YoY5vHbSiStMRe0S7R5j2caHg8Oo+Wru6YGDSA== + dependencies: + "@babel/runtime" "^7.9.2" + "@wordpress/a11y" "^2.11.0" + "@wordpress/blob" "^2.9.0" + "@wordpress/blocks" "^6.20.3" + "@wordpress/components" "^10.0.5" + "@wordpress/compose" "^3.19.3" + "@wordpress/data" "^4.22.3" + "@wordpress/deprecated" "^2.9.0" + "@wordpress/dom" "^2.13.1" + "@wordpress/element" "^2.16.0" + "@wordpress/hooks" "^2.9.0" + "@wordpress/html-entities" "^2.8.0" + "@wordpress/i18n" "^3.14.0" + "@wordpress/icons" "^2.4.0" + "@wordpress/is-shallow-equal" "^2.1.0" + "@wordpress/keyboard-shortcuts" "^1.9.3" + "@wordpress/keycodes" "^2.14.0" + "@wordpress/notices" "^2.8.3" + "@wordpress/rich-text" "^3.20.4" + "@wordpress/shortcode" "^2.9.0" + "@wordpress/token-list" "^1.11.0" + "@wordpress/url" "^2.17.0" + "@wordpress/viewport" "^2.21.3" + "@wordpress/wordcount" "^2.10.0" + classnames "^2.2.5" + css-mediaquery "^0.1.2" + diff "^4.0.2" + dom-scroll-into-view "^1.2.1" + inherits "^2.0.3" + lodash "^4.17.15" + memize "^1.1.0" + react-autosize-textarea "^3.0.2" + react-spring "^8.0.19" + reakit "1.1.0" + redux-multi "^0.1.12" + refx "^3.0.0" + rememo "^3.0.0" + tinycolor2 "^1.4.1" + traverse "^0.6.6" + "@wordpress/block-library@^2.18.0": version "2.18.0" resolved "https://registry.yarnpkg.com/@wordpress/block-library/-/block-library-2.18.0.tgz#6dc720622d8676e8da4f524b2604bf84fb418045" @@ -4891,6 +4936,47 @@ react-easy-crop "^3.0.0" tinycolor2 "^1.4.1" +"@wordpress/block-library@^2.22.6": + version "2.22.6" + resolved "https://registry.yarnpkg.com/@wordpress/block-library/-/block-library-2.22.6.tgz#25dfbc2146ad176ee459e236c40bf0dc11f8940c" + integrity sha512-zHy7qso6XbTcnf+sWz63JwUNZ1V6mXliUE4g/t5ea46jJal9gZqU1BtthSROsFLgiHbxtqrUJD3MyTN1BwYsYw== + dependencies: + "@babel/runtime" "^7.9.2" + "@wordpress/a11y" "^2.11.0" + "@wordpress/api-fetch" "^3.18.0" + "@wordpress/autop" "^2.9.0" + "@wordpress/blob" "^2.9.0" + "@wordpress/block-editor" "^4.3.6" + "@wordpress/blocks" "^6.20.3" + "@wordpress/components" "^10.0.5" + "@wordpress/compose" "^3.19.3" + "@wordpress/core-data" "^2.20.3" + "@wordpress/data" "^4.22.3" + "@wordpress/date" "^3.10.0" + "@wordpress/deprecated" "^2.9.0" + "@wordpress/dom" "^2.13.1" + "@wordpress/editor" "^9.20.6" + "@wordpress/element" "^2.16.0" + "@wordpress/escape-html" "^1.9.0" + "@wordpress/hooks" "^2.9.0" + "@wordpress/i18n" "^3.14.0" + "@wordpress/icons" "^2.4.0" + "@wordpress/is-shallow-equal" "^2.1.0" + "@wordpress/keycodes" "^2.14.0" + "@wordpress/notices" "^2.8.3" + "@wordpress/primitives" "^1.7.0" + "@wordpress/rich-text" "^3.20.4" + "@wordpress/server-side-render" "^1.16.5" + "@wordpress/url" "^2.17.0" + "@wordpress/viewport" "^2.21.3" + classnames "^2.2.5" + fast-average-color "4.3.0" + lodash "^4.17.15" + memize "^1.1.0" + moment "^2.22.1" + react-easy-crop "^3.0.0" + tinycolor2 "^1.4.1" + "@wordpress/block-serialization-default-parser@^3.6.0": version "3.6.0" resolved "https://registry.yarnpkg.com/@wordpress/block-serialization-default-parser/-/block-serialization-default-parser-3.6.0.tgz#4a9453a004a225a95d1f5c148d64087e5188badd" @@ -5043,6 +5129,46 @@ tinycolor2 "^1.4.1" uuid "^7.0.2" +"@wordpress/components@^10.0.5": + version "10.0.5" + resolved "https://registry.yarnpkg.com/@wordpress/components/-/components-10.0.5.tgz#00b72751dc928e554e77b44408cf18f938ef3a88" + integrity sha512-kR6LqSwvOh2yzZuAips8DjFbBEaSlDifIw65x7FwQgwCpHS9LlzOuqljmOCSieBgrlbnCaBOFeXFeKuvog7seA== + dependencies: + "@babel/runtime" "^7.9.2" + "@emotion/core" "^10.0.22" + "@emotion/css" "^10.0.22" + "@emotion/native" "^10.0.22" + "@emotion/styled" "^10.0.23" + "@wordpress/a11y" "^2.11.0" + "@wordpress/compose" "^3.19.3" + "@wordpress/deprecated" "^2.9.0" + "@wordpress/dom" "^2.13.1" + "@wordpress/element" "^2.16.0" + "@wordpress/hooks" "^2.9.0" + "@wordpress/i18n" "^3.14.0" + "@wordpress/icons" "^2.4.0" + "@wordpress/is-shallow-equal" "^2.1.0" + "@wordpress/keycodes" "^2.14.0" + "@wordpress/primitives" "^1.7.0" + "@wordpress/rich-text" "^3.20.4" + "@wordpress/warning" "^1.2.0" + classnames "^2.2.5" + dom-scroll-into-view "^1.2.1" + downshift "^5.4.0" + gradient-parser "^0.1.5" + lodash "^4.17.15" + memize "^1.1.0" + moment "^2.22.1" + re-resizable "^6.4.0" + react-dates "^17.1.1" + react-resize-aware "^3.0.1" + react-spring "^8.0.20" + react-use-gesture "^7.0.15" + reakit "^1.1.0" + rememo "^3.0.0" + tinycolor2 "^1.4.1" + uuid "^7.0.2" + "@wordpress/compose@*", "@wordpress/compose@1.x.x - 3.x.x", "@wordpress/compose@^3.15.0", "@wordpress/compose@^3.9.0": version "3.15.0" resolved "https://registry.yarnpkg.com/@wordpress/compose/-/compose-3.15.0.tgz#db6faacddc18c23baf6deec0ff4445c804f3afa6" @@ -5362,6 +5488,40 @@ refx "^3.0.0" rememo "^3.0.0" +"@wordpress/edit-site@^1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@wordpress/edit-site/-/edit-site-1.11.6.tgz#101e61e7394fbf6bfd3258c794b78e14cf748b3c" + integrity sha512-cr00Nf6OHEfdt8l2QM23lCvqEo5QYH8s6Cw42iXfFt21Zg40FcSpXAhQx/DSVzNvYOGV8Pf6jKAbZNfwYWUuKQ== + dependencies: + "@babel/runtime" "^7.9.2" + "@wordpress/api-fetch" "^3.18.0" + "@wordpress/block-editor" "^4.3.6" + "@wordpress/block-library" "^2.22.6" + "@wordpress/blocks" "^6.20.3" + "@wordpress/components" "^10.0.5" + "@wordpress/compose" "^3.19.3" + "@wordpress/core-data" "^2.20.3" + "@wordpress/data" "^4.22.3" + "@wordpress/data-controls" "^1.16.3" + "@wordpress/editor" "^9.20.6" + "@wordpress/element" "^2.16.0" + "@wordpress/hooks" "^2.9.0" + "@wordpress/i18n" "^3.14.0" + "@wordpress/icons" "^2.4.0" + "@wordpress/interface" "^0.7.5" + "@wordpress/keyboard-shortcuts" "^1.9.3" + "@wordpress/keycodes" "^2.14.0" + "@wordpress/media-utils" "^1.15.0" + "@wordpress/notices" "^2.8.3" + "@wordpress/plugins" "^2.20.3" + "@wordpress/primitives" "^1.7.0" + "@wordpress/url" "^2.17.0" + downloadjs "^1.4.7" + file-saver "^2.0.2" + jszip "^3.2.2" + lodash "^4.17.15" + rememo "^3.0.0" + "@wordpress/editor@*", "@wordpress/editor@^9.16.0": version "9.16.0" resolved "https://registry.yarnpkg.com/@wordpress/editor/-/editor-9.16.0.tgz#582048119a9dc6f5476202b4de48cb578f948565" @@ -5445,6 +5605,47 @@ refx "^3.0.0" rememo "^3.0.0" +"@wordpress/editor@^9.20.6": + version "9.20.6" + resolved "https://registry.yarnpkg.com/@wordpress/editor/-/editor-9.20.6.tgz#7ff3e7bfc0bb471b1aa9dde2a1d091ab3f77c675" + integrity sha512-v+2s9UaoalFpF/0aEYlwYovLAs4tc9jnC2V5u53S8xMCb2pHWqThE4nFz0oWIRwCm76cWrfv5FsRu/yP+HUBkA== + dependencies: + "@babel/runtime" "^7.9.2" + "@wordpress/api-fetch" "^3.18.0" + "@wordpress/autop" "^2.9.0" + "@wordpress/blob" "^2.9.0" + "@wordpress/block-editor" "^4.3.6" + "@wordpress/blocks" "^6.20.3" + "@wordpress/components" "^10.0.5" + "@wordpress/compose" "^3.19.3" + "@wordpress/core-data" "^2.20.3" + "@wordpress/data" "^4.22.3" + "@wordpress/data-controls" "^1.16.3" + "@wordpress/date" "^3.10.0" + "@wordpress/deprecated" "^2.9.0" + "@wordpress/element" "^2.16.0" + "@wordpress/hooks" "^2.9.0" + "@wordpress/html-entities" "^2.8.0" + "@wordpress/i18n" "^3.14.0" + "@wordpress/icons" "^2.4.0" + "@wordpress/is-shallow-equal" "^2.1.0" + "@wordpress/keyboard-shortcuts" "^1.9.3" + "@wordpress/keycodes" "^2.14.0" + "@wordpress/media-utils" "^1.15.0" + "@wordpress/notices" "^2.8.3" + "@wordpress/rich-text" "^3.20.4" + "@wordpress/server-side-render" "^1.16.5" + "@wordpress/url" "^2.17.0" + "@wordpress/viewport" "^2.21.3" + "@wordpress/wordcount" "^2.10.0" + classnames "^2.2.5" + lodash "^4.17.15" + memize "^1.1.0" + react-autosize-textarea "^3.0.2" + redux-optimist "^1.0.0" + refx "^3.0.0" + rememo "^3.0.0" + "@wordpress/element@*", "@wordpress/element@^2.14.0": version "2.14.0" resolved "https://registry.yarnpkg.com/@wordpress/element/-/element-2.14.0.tgz#54e9543269c8f898c4e375f09f119cfb414ce18e" @@ -5654,6 +5855,21 @@ classnames "^2.2.5" lodash "^4.17.15" +"@wordpress/interface@^0.7.5": + version "0.7.5" + resolved "https://registry.yarnpkg.com/@wordpress/interface/-/interface-0.7.5.tgz#15133c57f024cc61490da1b626d79d73e116dbfc" + integrity sha512-n1/ZN0+OUC/h0txfhvSnPIE5G/2Bu5RbmnixUPLSCrw1uwAKjYHFIFESRo/+KSKFLXM2z2UfgRIyfC/0OtyxsA== + dependencies: + "@babel/runtime" "^7.9.2" + "@wordpress/components" "^10.0.5" + "@wordpress/data" "^4.22.3" + "@wordpress/element" "^2.16.0" + "@wordpress/i18n" "^3.14.0" + "@wordpress/icons" "^2.4.0" + "@wordpress/plugins" "^2.20.3" + classnames "^2.2.5" + lodash "^4.17.15" + "@wordpress/is-shallow-equal@^2.0.0": version "2.0.0" resolved "https://registry.yarnpkg.com/@wordpress/is-shallow-equal/-/is-shallow-equal-2.0.0.tgz#1c9f7ab5419df3bcf525ebe3f48d67ee6ce2d687" @@ -5932,6 +6148,24 @@ memize "^1.1.0" rememo "^3.0.0" +"@wordpress/rich-text@^3.20.4": + version "3.20.4" + resolved "https://registry.yarnpkg.com/@wordpress/rich-text/-/rich-text-3.20.4.tgz#8b85a0712ce7b6ff41021ff18e355b67e352b489" + integrity sha512-t7rjWajAKks2XcbVnyccckFzZFPnBJtPjoJGvmQdCJkZqen7qAM+OLzfQLUEDqYzG7Rk2v8zPxhhDv/gI2ciMg== + dependencies: + "@babel/runtime" "^7.9.2" + "@wordpress/compose" "^3.19.3" + "@wordpress/data" "^4.22.3" + "@wordpress/deprecated" "^2.9.0" + "@wordpress/element" "^2.16.0" + "@wordpress/escape-html" "^1.9.0" + "@wordpress/is-shallow-equal" "^2.1.0" + "@wordpress/keycodes" "^2.14.0" + classnames "^2.2.5" + lodash "^4.17.15" + memize "^1.1.0" + rememo "^3.0.0" + "@wordpress/scripts@^12.1.1": version "12.1.1" resolved "https://registry.yarnpkg.com/@wordpress/scripts/-/scripts-12.1.1.tgz#763d3c5375259437f45af368f3e80b4369a3070a" @@ -6011,6 +6245,21 @@ "@wordpress/url" "^2.17.0" lodash "^4.17.15" +"@wordpress/server-side-render@^1.16.5": + version "1.16.5" + resolved "https://registry.yarnpkg.com/@wordpress/server-side-render/-/server-side-render-1.16.5.tgz#6b252671a848c1b98533a5c30d850ed0c6f426dc" + integrity sha512-5QcyKIO1GCPVzqopwhTN+zIlpAO28G4LSgr0AXQ5f8FNtBxcpdfXzSnhveoSrLXVkXaEj+/qjS7Yb8FIkWeC6A== + dependencies: + "@babel/runtime" "^7.9.2" + "@wordpress/api-fetch" "^3.18.0" + "@wordpress/components" "^10.0.5" + "@wordpress/data" "^4.22.3" + "@wordpress/deprecated" "^2.9.0" + "@wordpress/element" "^2.16.0" + "@wordpress/i18n" "^3.14.0" + "@wordpress/url" "^2.17.0" + lodash "^4.17.15" + "@wordpress/shortcode@^2.7.0": version "2.7.0" resolved "https://registry.yarnpkg.com/@wordpress/shortcode/-/shortcode-2.7.0.tgz#48094ea447b1d0ebe96a07aadceec4fb0e134adb" @@ -11281,6 +11530,11 @@ dotenv@^8.0.0: resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-8.2.0.tgz#97e619259ada750eea3e4ea3e26bceea5424b16a" integrity sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw== +downloadjs@^1.4.7: + version "1.4.7" + resolved "https://registry.yarnpkg.com/downloadjs/-/downloadjs-1.4.7.tgz#f69f96f940e0d0553dac291139865a3cd0101e3c" + integrity sha1-9p+W+UDg0FU9rCkROYZaPNAQHjw= + downshift@^4.0.5: version "4.1.0" resolved "https://registry.yarnpkg.com/downshift/-/downshift-4.1.0.tgz#a16c67ea965fd7c310c5f7872276e109a4de1704" @@ -11292,9 +11546,9 @@ downshift@^4.0.5: react-is "^16.9.0" downshift@^5.4.0: - version "5.4.7" - resolved "https://registry.yarnpkg.com/downshift/-/downshift-5.4.7.tgz#2ab7b0512cad33011ee6f29630f9a7bb74dff2b5" - integrity sha512-xaH0RNqwJ5pAsyk9qBmR9XJWmg1OOWMfrhzYv0NH2NjJxn77S3zBcfClw341UfhGyKg5v+qVqg/CQzvAgBNCXQ== + version "5.4.6" + resolved "https://registry.yarnpkg.com/downshift/-/downshift-5.4.6.tgz#916b6c079f3af273486a6b864b45459df991c1c6" + integrity sha512-GtSCmZUQMulQQ0gX3N3jvUAABJNU8IfAMLzFLu0E2fcOTt98xropy0iriYW2PSClRUqJ4QwKAov7FDy9Gk9aOA== dependencies: "@babel/runtime" "^7.10.2" compute-scroll-into-view "^1.0.14" @@ -12869,6 +13123,11 @@ file-loader@^4.2.0, file-loader@^4.3.0: loader-utils "^1.2.3" schema-utils "^2.5.0" +file-saver@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/file-saver/-/file-saver-2.0.2.tgz#06d6e728a9ea2df2cce2f8d9e84dfcdc338ec17a" + integrity sha512-Wz3c3XQ5xroCxd1G8b7yL0Ehkf0TC9oYC6buPFkNnU9EnaPlifeAFCyCh+iewXTyFRcg0a6j3J7FmJsIhlhBdw== + file-system-cache@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/file-system-cache/-/file-system-cache-1.0.5.tgz#84259b36a2bbb8d3d6eb1021d3132ffe64cfff4f" @@ -17351,6 +17610,16 @@ jszip@^3.1.5: readable-stream "~2.3.6" set-immediate-shim "~1.0.1" +jszip@^3.2.2: + version "3.5.0" + resolved "https://registry.yarnpkg.com/jszip/-/jszip-3.5.0.tgz#b4fd1f368245346658e781fec9675802489e15f6" + integrity sha512-WRtu7TPCmYePR1nazfrtuF216cIVon/3GWOvHS9QR5bIwSbnxtdpma6un3jyGGNhHsKCSzn5Ypk+EkDRvTGiFA== + dependencies: + lie "~3.3.0" + pako "~1.0.2" + readable-stream "~2.3.6" + set-immediate-shim "~1.0.1" + junit-viewer@^4.9.6: version "4.9.6" resolved "https://registry.yarnpkg.com/junit-viewer/-/junit-viewer-4.9.6.tgz#c63676ddadeff67146d1f407b0f1e654407e89d8" @@ -22620,9 +22889,9 @@ react-draggable@^4.0.3: prop-types "^15.6.0" react-easy-crop@^3.0.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/react-easy-crop/-/react-easy-crop-3.1.1.tgz#e5f5d8d42540be7ab1ddb8c79927b9f75ee6ec43" - integrity sha512-q5NYzFyzMNbTg/hYLc74lWl/uuQPbWAvge0MUywkLdAuc2A6KxKWplcMBHGQg3dVGqMqnpu7TMDgiZboJOFkbA== + version "3.1.0" + resolved "https://registry.yarnpkg.com/react-easy-crop/-/react-easy-crop-3.1.0.tgz#cd2dd19188f12d3922aeeb677321ed9de9073ae0" + integrity sha512-bAJxqau48Y4KyvKT+kANE83F/+mpZo0XUVKfWtE2EVqS0f+hqfQ2CEl43lRUx34j/WCdUFh/nw0pcf4Dqq5CNw== dependencies: tslib "1.11.2"