├── .eslintignore ├── .eslintrc ├── .gitignore ├── CHANGELOG.md ├── LICENSE ├── README.md ├── config ├── block-vars.js ├── env.js ├── gutenberg │ ├── README.md │ ├── assets-queue.js │ ├── index.js │ ├── scripts.json │ ├── styles.json │ ├── update.sh │ └── vendor.json ├── jest │ ├── cssTransform.js │ └── fileTransform.js ├── paths.js ├── webpack.config.dev.js ├── webpack.config.prod.js └── webpackDevServer.config.js ├── g-scripts.txt ├── g-styles.txt ├── package.json ├── public ├── favicon.ico ├── index.html ├── manifest.json ├── media │ ├── audio1-thumb.png │ ├── audio1.mp3 │ ├── img1.jpg │ ├── img2.jpeg │ ├── img3.png │ ├── video1-thumb.jpg │ ├── video1.mp4 │ ├── video2-thumb.jpg │ └── video2.mp4 └── vendor │ ├── g-data.js │ ├── gutenberg │ ├── styles │ │ ├── wp-block-directory │ │ │ ├── style-rtl.css │ │ │ ├── style-rtl.min.css │ │ │ ├── style.css │ │ │ └── style.min.css │ │ ├── wp-block-editor │ │ │ ├── style-rtl.css │ │ │ ├── style-rtl.min.css │ │ │ ├── style.css │ │ │ └── style.min.css │ │ ├── wp-block-library │ │ │ ├── editor-rtl.css │ │ │ ├── editor-rtl.min.css │ │ │ ├── editor.css │ │ │ ├── editor.min.css │ │ │ ├── style-rtl.css │ │ │ ├── style-rtl.min.css │ │ │ ├── style.css │ │ │ ├── style.min.css │ │ │ ├── theme-rtl.css │ │ │ ├── theme-rtl.min.css │ │ │ ├── theme.css │ │ │ └── theme.min.css │ │ ├── wp-components │ │ │ ├── style-rtl.css │ │ │ ├── style-rtl.min.css │ │ │ ├── style.css │ │ │ └── style.min.css │ │ ├── wp-edit-post │ │ │ ├── style-rtl.css │ │ │ ├── style-rtl.min.css │ │ │ ├── style.css │ │ │ └── style.min.css │ │ ├── wp-editor │ │ │ ├── editor-styles-rtl.css │ │ │ ├── editor-styles-rtl.min.css │ │ │ ├── editor-styles.css │ │ │ ├── editor-styles.min.css │ │ │ ├── style-rtl.css │ │ │ ├── style-rtl.min.css │ │ │ ├── style.css │ │ │ └── style.min.css │ │ ├── wp-format-library │ │ │ ├── style-rtl.css │ │ │ ├── style-rtl.min.css │ │ │ ├── style.css │ │ │ └── style.min.css │ │ ├── wp-list-reusable-blocks │ │ │ ├── style-rtl.css │ │ │ ├── style-rtl.min.css │ │ │ ├── style.css │ │ │ └── style.min.css │ │ └── wp-nux │ │ │ ├── style-rtl.css │ │ │ ├── style-rtl.min.css │ │ │ ├── style.css │ │ │ └── style.min.css │ ├── vendor │ │ ├── lodash.js │ │ ├── lodash.min.js │ │ ├── moment.js │ │ ├── moment.min.js │ │ ├── react-dom.js │ │ ├── react-dom.min.js │ │ ├── react.js │ │ ├── react.min.js │ │ ├── wp-polyfill-dom-rect.js │ │ ├── wp-polyfill-dom-rect.min.js │ │ ├── wp-polyfill-element-closest.js │ │ ├── wp-polyfill-element-closest.min.js │ │ ├── wp-polyfill-fetch.js │ │ ├── wp-polyfill-fetch.min.js │ │ ├── wp-polyfill-formdata.js │ │ ├── wp-polyfill-formdata.min.js │ │ ├── wp-polyfill-node-contains.js │ │ ├── wp-polyfill-node-contains.min.js │ │ ├── wp-polyfill-url.js │ │ ├── wp-polyfill-url.min.js │ │ ├── wp-polyfill.js │ │ └── wp-polyfill.min.js │ ├── wp-a11y.js │ ├── wp-a11y.min.js │ ├── wp-annotations.js │ ├── wp-annotations.min.js │ ├── wp-api-fetch.js │ ├── wp-api-fetch.min.js │ ├── wp-autop.js │ ├── wp-autop.min.js │ ├── wp-blob.js │ ├── wp-blob.min.js │ ├── wp-block-directory.js │ ├── wp-block-directory.min.js │ ├── wp-block-editor.js │ ├── wp-block-editor.min.js │ ├── wp-block-library.js │ ├── wp-block-library.min.js │ ├── wp-block-serialization-default-parser.js │ ├── wp-block-serialization-default-parser.min.js │ ├── wp-blocks.js │ ├── wp-blocks.min.js │ ├── wp-components.js │ ├── wp-components.min.js │ ├── wp-compose.js │ ├── wp-compose.min.js │ ├── wp-core-data.js │ ├── wp-core-data.min.js │ ├── wp-data-controls.js │ ├── wp-data-controls.min.js │ ├── wp-data.js │ ├── wp-data.min.js │ ├── wp-date.js │ ├── wp-date.min.js │ ├── wp-deprecated.js │ ├── wp-deprecated.min.js │ ├── wp-dom-ready.js │ ├── wp-dom-ready.min.js │ ├── wp-dom.js │ ├── wp-dom.min.js │ ├── wp-edit-post.js │ ├── wp-edit-post.min.js │ ├── wp-editor.js │ ├── wp-editor.min.js │ ├── wp-element.js │ ├── wp-element.min.js │ ├── wp-escape-html.js │ ├── wp-escape-html.min.js │ ├── wp-format-library.js │ ├── wp-format-library.min.js │ ├── wp-hooks.js │ ├── wp-hooks.min.js │ ├── wp-html-entities.js │ ├── wp-html-entities.min.js │ ├── wp-i18n.js │ ├── wp-i18n.min.js │ ├── wp-is-shallow-equal.js │ ├── wp-is-shallow-equal.min.js │ ├── wp-keyboard-shortcuts.js │ ├── wp-keyboard-shortcuts.min.js │ ├── wp-keycodes.js │ ├── wp-keycodes.min.js │ ├── wp-list-reusable-blocks.js │ ├── wp-list-reusable-blocks.min.js │ ├── wp-media-utils.js │ ├── wp-media-utils.min.js │ ├── wp-notices.js │ ├── wp-notices.min.js │ ├── wp-nux.js │ ├── wp-nux.min.js │ ├── wp-plugins.js │ ├── wp-plugins.min.js │ ├── wp-primitives.js │ ├── wp-primitives.min.js │ ├── wp-priority-queue.js │ ├── wp-priority-queue.min.js │ ├── wp-redux-routine.js │ ├── wp-redux-routine.min.js │ ├── wp-rich-text.js │ ├── wp-rich-text.min.js │ ├── wp-server-side-render.js │ ├── wp-server-side-render.min.js │ ├── wp-shortcode.js │ ├── wp-shortcode.min.js │ ├── wp-token-list.js │ ├── wp-token-list.min.js │ ├── wp-url.js │ ├── wp-url.min.js │ ├── wp-viewport.js │ ├── wp-viewport.min.js │ ├── wp-warning.js │ ├── wp-warning.min.js │ ├── wp-wordcount.js │ └── wp-wordcount.min.js │ └── no-conflict.js ├── scripts ├── build.js ├── g-scripts.js ├── g-update.js ├── start.js └── test.js └── src ├── core ├── api-fetch.js ├── index.js ├── media-library.scss ├── media-upload.js ├── settings.js └── style.scss ├── data ├── categories.json ├── taxonomies.json ├── themes.json ├── types.json └── users.json ├── globals ├── api-fetch.js ├── api-routes.js ├── embeds.js ├── fake-data.js └── fake-media.js ├── index.js ├── pages ├── editor.js ├── editor.scss └── preview.js └── serviceWorker.js /.eslintignore: -------------------------------------------------------------------------------- 1 | 2 | build/* 3 | config/* 4 | node_modules/* 5 | public/vendor/* 6 | scripts/* 7 | src/serviceWorker.js 8 | -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "parser": "babel-eslint", 3 | "extends": [ 4 | "eslint:recommended", 5 | "plugin:react/recommended" 6 | ], 7 | "env": { 8 | "browser": false, 9 | "es6": true, 10 | "node": true 11 | }, 12 | "parserOptions": { 13 | "sourceType": "module", 14 | "ecmaFeatures": { 15 | "jsx": true 16 | } 17 | }, 18 | "globals": { 19 | "window": true, 20 | "document": true, 21 | "localStorage": true, 22 | "sessionStorage": true, 23 | "React": true, 24 | "ReactDOM": true, 25 | "fetch": true 26 | }, 27 | "plugins": [ 28 | "react" 29 | ], 30 | "settings": { 31 | "react": { 32 | "pragma": "React", 33 | "version": "16.0" 34 | } 35 | }, 36 | "rules": { 37 | "arrow-parens": ["warn", "as-needed"], 38 | "arrow-spacing": "warn", 39 | "block-scoped-var": "warn", 40 | "brace-style": [ "warn", "stroustrup", { 41 | "allowSingleLine": true 42 | }], 43 | 44 | "comma-dangle": [ "warn", "always-multiline" ], 45 | "comma-spacing": "warn", 46 | "comma-style": "warn", 47 | 48 | "curly": "warn", 49 | "dot-notation": "warn", 50 | "eol-last": "error", 51 | "eqeqeq": "warn", 52 | 53 | "func-call-spacing": [ "warn", "never" ], 54 | "func-style": [ "error", "declaration", { 55 | "allowArrowFunctions": true 56 | }], 57 | "generator-star-spacing": "warn", 58 | "indent": [ "warn", 2, { 59 | "MemberExpression": 0, 60 | "SwitchCase": 1 61 | }], 62 | "jsx-quotes": "error", 63 | "new-parens": "error", 64 | 65 | "no-caller": "error", 66 | "no-console": "off", 67 | "no-duplicate-imports": "error", 68 | "no-else-return": "warn", 69 | "no-eval": "error", 70 | "no-extra-label": "warn", 71 | "no-floating-decimal": "warn", 72 | "no-lonely-if": "warn", 73 | "no-mixed-operators": "warn", 74 | "no-multi-str": "error", 75 | "no-negated-in-lhs": "warn", 76 | "no-shadow": "warn", 77 | "no-undef-init": "error", 78 | "no-unused-expressions": "error", 79 | "no-useless-computed-key": "warn", 80 | "no-useless-constructor": "warn", 81 | "no-useless-rename": "warn", 82 | "no-useless-return": "warn", 83 | "no-var": "error", 84 | "no-whitespace-before-property": "warn", 85 | 86 | "object-curly-spacing": [ "error", "always" ], 87 | "prefer-const": "warn", 88 | "prefer-rest-params": "warn", 89 | "quote-props": [ "error", "as-needed" ], 90 | "quotes": [ "warn", "single", { 91 | "allowTemplateLiterals": true 92 | }], 93 | 94 | "rest-spread-spacing": ["warn", "never"], 95 | "semi-spacing": "warn", 96 | "semi-style": [ "warn", "last" ], 97 | "semi": [ "error", "always" ], 98 | 99 | "space-before-blocks": "warn", 100 | "space-before-function-paren": "warn", 101 | "space-infix-ops": "warn", 102 | "space-in-parens": ["warn", "never"], 103 | "spaced-comment": ["warn", "always"], 104 | "template-curly-spacing": "warn", 105 | "yield-star-spacing": "warn", 106 | 107 | "valid-jsdoc": ["warn", { 108 | "requireReturn": false, 109 | "requireReturnDescription": false, 110 | "requireParamDescription": false 111 | }], 112 | 113 | "react/display-name": "off", 114 | "react/jsx-curly-spacing": "off", 115 | "react/jsx-equals-spacing": "error", 116 | "react/jsx-indent": [ "warn", 2 ], 117 | "react/jsx-indent-props": [ "warn", 2 ], 118 | "react/jsx-key": "error", 119 | "react/jsx-uses-react": "error", 120 | "react/jsx-uses-vars": "error", 121 | "react/jsx-tag-spacing": "warn", 122 | "react/no-children-prop": "off", 123 | "react/no-find-dom-node": "warn", 124 | "react/no-unescaped-entities": "off", 125 | "react/prop-types": "off" 126 | } 127 | } 128 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | 6 | # testing 7 | /coverage 8 | 9 | # production 10 | /build 11 | 12 | # temporary files 13 | /tmp 14 | 15 | # misc 16 | .DS_Store 17 | .env.local 18 | .env.development.local 19 | .env.test.local 20 | .env.production.local 21 | 22 | npm-debug.log* 23 | yarn-debug.log* 24 | yarn-error.log* 25 | package-lock.json 26 | yarn.lock 27 | 28 | *.php 29 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # g-editor changelog 2 | 3 | ## 1.3.0 4 | 5 | ### Added 6 | - Read block config from the gutenbergCloud settings (if present) 7 | 8 | ### Changed 9 | - Update Gutenberg to latest version (6.1.1) 10 | 11 | 12 | ## 1.2.0 13 | 14 | ### Added 15 | - Support for frontend scripts 16 | 17 | ### Changed 18 | - Fixed default public URL on production build 19 | 20 | 21 | ## 1.1.0 22 | 23 | ### Added 24 | - Allow a target build folder to be set with an environment var 25 | 26 | ### Changed 27 | - Only send essential folders to NPM 28 | 29 | 30 | ## 1.0.0 31 | 32 | ### Changed 33 | - Removed Gutenberg-JS dependency 34 | - Added scripts from Gutenberg-js 35 | - Load Gutenberg packages directly 36 | 37 | 38 | ## 0.4.0 39 | 40 | ### Added 41 | - Added fake data for taxonomies, categories and users. 42 | - Added button to clear local storage manually instead of clearing on bootup. 43 | - Implemented basic image upload to memory. 44 | - Added changelog. 45 | 46 | ### Changed 47 | - Updated Gutenberg-JS dependency to the latest version (4.0.0). 48 | - Local storage is no longer cleared on bootup. This makes it possible to test blocks that were pre-saved for consistency and deprecated markup. 49 | - Refactored API Fetch function to cover more WP API Endpoints. 50 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Frontkom 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # g-editor 2 | 3 | A minimalist version of Gutenberg's editor. Ideal for checking your custom blocks. 4 | 5 | ``` bash 6 | npm install @frontkom/g-editor 7 | npm start 8 | ``` 9 | 10 | You can include your custom block by passing its path in `BLOCK_DIR` env var. 11 | 12 | ``` bash 13 | BLOCK_DIR=\absolute\path\to\your-custom-block npm start 14 | ``` 15 | 16 | The editor expects that your custom block has an `index.js` and a `style.css` in its `build` folder. 17 | 18 | ``` 19 | your-custom-block 20 | ├── ... 21 | ├── build 22 | │ ├── index.js 23 | │ └── style.css 24 | └── ... 25 | ``` 26 | 27 | 28 | ## g-editor and Gutenberg-js 29 | 30 | Since version 1.0, `g-editor` no longer depends on `Gutenberg-js`. 31 | It now includes the source `Gutenberg` packages directly. 32 | 33 | ## Current Gutenberg version 34 | 35 | [v8.5.1](https://github.com/WordPress/gutenberg/releases/tag/v8.5.1) 36 | 37 | ### Better updates 38 | 39 | To update Gutenberg packages, run 40 | ``` 41 | npm run g-update 42 | ``` 43 | 44 | It will pull to your local machine from the WordPress repo the Gutenberg packages assets ready to use. After copy those assets to `public/vendor/gutenberg`, the script will generate `g-scripts.txt` and `g-styles.txt` files with all the depencies the editor needs to run. 45 | 46 | 47 | ## Assets 48 | 49 | The sample videos are a courtesy of [Pixabay](https://pixabay.com/): 50 | 51 | * [https://pixabay.com/en/videos/cute-cat-funny-cat-kitten-domestic-3092/](https://pixabay.com/en/videos/cute-cat-funny-cat-kitten-domestic-3092/) 52 | * [https://pixabay.com/en/videos/cat-cat-thailand-small-indian-civet-1297/](https://pixabay.com/en/videos/cat-cat-thailand-small-indian-civet-1297/) 53 | -------------------------------------------------------------------------------- /config/block-vars.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const fs = require('fs'); 4 | const path = require('path'); 5 | 6 | const blockDir = process.env.BLOCK_DIR || false; 7 | 8 | module.exports = function getBlockVars () { 9 | // Check if a directory was passed as an env var 10 | if(!blockDir || !fs.lstatSync(blockDir).isDirectory()) { 11 | return {}; 12 | } 13 | 14 | // Extract the content of a file as a string 15 | const getFileContents = file => 16 | fs.existsSync(file) && fs.lstatSync(file).isFile() 17 | ? fs.readFileSync(file).toString() 18 | : undefined; 19 | 20 | // Read the block config (if exists) 21 | const blockPkg = getFileContents(path.resolve(blockDir, 'package.json')); 22 | const config = blockPkg && JSON.parse(blockPkg).gutenbergCloud; 23 | 24 | 25 | // Extract the file name from the block config or set a default 26 | function getFileName (name, oldName, defName) { 27 | const file = config && (config[name] || config[oldName]); 28 | return file ? path.resolve(blockDir, file) : path.resolve(blockDir, 'build', defName); 29 | } 30 | 31 | // Get the file names to be loaded 32 | const editorJs = getFileName('editor-js', 'js', 'index.js'); 33 | const viewCss = getFileName('view-css', 'css', 'style.css'); 34 | const editorCss = getFileName('editor-css', 'editor', 'editor.css'); 35 | const viewJs = getFileName('view-js', 'scripts', 'scripts.js'); 36 | 37 | 38 | // Load the block files 39 | const blockVars = {}; 40 | 41 | blockVars.blockScript = getFileContents(editorJs); 42 | blockVars.blockStyle = getFileContents(viewCss); 43 | blockVars.blockEditorStyle = getFileContents(editorCss); 44 | const blockViewScript = getFileContents(viewJs); 45 | blockVars.blockViewScript = blockViewScript && Buffer.from(blockViewScript).toString('base64'); 46 | 47 | return blockVars; 48 | }; 49 | -------------------------------------------------------------------------------- /config/env.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const fs = require('fs'); 4 | const path = require('path'); 5 | const paths = require('./paths'); 6 | 7 | // Make sure that including paths.js after env.js will read .env variables. 8 | delete require.cache[require.resolve('./paths')]; 9 | 10 | const NODE_ENV = process.env.NODE_ENV; 11 | if (!NODE_ENV) { 12 | throw new Error( 13 | 'The NODE_ENV environment variable is required but was not specified.' 14 | ); 15 | } 16 | 17 | // https://github.com/bkeepers/dotenv#what-other-env-files-can-i-use 18 | var dotenvFiles = [ 19 | `${paths.dotenv}.${NODE_ENV}.local`, 20 | `${paths.dotenv}.${NODE_ENV}`, 21 | // Don't include `.env.local` for `test` environment 22 | // since normally you expect tests to produce the same 23 | // results for everyone 24 | NODE_ENV !== 'test' && `${paths.dotenv}.local`, 25 | paths.dotenv, 26 | ].filter(Boolean); 27 | 28 | // Load environment variables from .env* files. Suppress warnings using silent 29 | // if this file is missing. dotenv will never modify any environment variables 30 | // that have already been set. Variable expansion is supported in .env files. 31 | // https://github.com/motdotla/dotenv 32 | // https://github.com/motdotla/dotenv-expand 33 | dotenvFiles.forEach(dotenvFile => { 34 | if (fs.existsSync(dotenvFile)) { 35 | require('dotenv-expand')( 36 | require('dotenv').config({ 37 | path: dotenvFile, 38 | }) 39 | ); 40 | } 41 | }); 42 | 43 | // We support resolving modules according to `NODE_PATH`. 44 | // This lets you use absolute paths in imports inside large monorepos: 45 | // https://github.com/facebook/create-react-app/issues/253. 46 | // It works similar to `NODE_PATH` in Node itself: 47 | // https://nodejs.org/api/modules.html#modules_loading_from_the_global_folders 48 | // Note that unlike in Node, only *relative* paths from `NODE_PATH` are honored. 49 | // Otherwise, we risk importing Node.js core modules into an app instead of Webpack shims. 50 | // https://github.com/facebook/create-react-app/issues/1023#issuecomment-265344421 51 | // We also resolve them to make sure all tools using them work consistently. 52 | const appDirectory = fs.realpathSync(process.cwd()); 53 | process.env.NODE_PATH = (process.env.NODE_PATH || '') 54 | .split(path.delimiter) 55 | .filter(folder => folder && !path.isAbsolute(folder)) 56 | .map(folder => path.resolve(appDirectory, folder)) 57 | .join(path.delimiter); 58 | 59 | // Grab NODE_ENV and REACT_APP_* environment variables and prepare them to be 60 | // injected into the application via DefinePlugin in Webpack configuration. 61 | const REACT_APP = /^REACT_APP_/i; 62 | 63 | function getClientEnvironment(publicUrl) { 64 | const raw = Object.keys(process.env) 65 | .filter(key => REACT_APP.test(key)) 66 | .reduce( 67 | (env, key) => { 68 | env[key] = process.env[key]; 69 | return env; 70 | }, 71 | { 72 | // Useful for determining whether we’re running in production mode. 73 | // Most importantly, it switches React into the correct mode. 74 | NODE_ENV: process.env.NODE_ENV || 'development', 75 | // Useful for resolving the correct path to static assets in `public`. 76 | // For example, . 77 | // This should only be used as an escape hatch. Normally you would put 78 | // images into the `src` and `import` them in code to get their paths. 79 | PUBLIC_URL: publicUrl, 80 | } 81 | ); 82 | // Stringify all values so we can feed into Webpack DefinePlugin 83 | const stringified = { 84 | 'process.env': Object.keys(raw).reduce((env, key) => { 85 | env[key] = JSON.stringify(raw[key]); 86 | return env; 87 | }, {}), 88 | }; 89 | 90 | return { raw, stringified }; 91 | } 92 | 93 | module.exports = getClientEnvironment; 94 | -------------------------------------------------------------------------------- /config/gutenberg/README.md: -------------------------------------------------------------------------------- 1 | # Gutenberg helpers 2 | 3 | ## Vendor scripts 4 | https://github.com/WordPress/WordPress/blob/master/wp-includes/script-loader.php#L81 5 | 6 | ## Gutenberg styles 7 | https://github.com/WordPress/WordPress/blob/master/wp-includes/script-loader.php#L1815; 8 | -------------------------------------------------------------------------------- /config/gutenberg/assets-queue.js: -------------------------------------------------------------------------------- 1 | module.exports = function AssetsQueue () { 2 | // Assets list and their dependencies 3 | // ex: { 'a': ['b', 'c', 'd'] , 'b': ['c'], 'c': [], 'd': ['b', 'c'] } 4 | const assetsList = []; 5 | 6 | // List of assets paths 7 | // ex: { 'a': './path/to/..' , 'b': '...', 'c': '...', 'c': '...' } 8 | const pathsList = []; 9 | 10 | // List of sorted assets 11 | // ex: ['c', 'b', 'd', 'a'] 12 | const sortedList = []; 13 | 14 | // Sorts assest list according their dependencies 15 | const sortList = list => { 16 | list.forEach(item => { 17 | if (assetsList[item] && assetsList[item].length) { 18 | sortList(assetsList[item]); 19 | } 20 | 21 | if (!sortedList.includes(item)) { 22 | sortedList.push(item); 23 | } 24 | }); 25 | }; 26 | 27 | return { 28 | enqueue: (name, path, deps) => { 29 | // Add asset to the assets list 30 | assetsList[name] = deps; 31 | // Add assest's path to the paths list 32 | pathsList[name] = path; 33 | }, 34 | getPaths: () => { 35 | // Sorting assets 36 | sortList(Object.keys(assetsList)); 37 | 38 | return sortedList.map(asset => ({ 39 | name: asset, 40 | path: pathsList[asset], 41 | })); 42 | }, 43 | }; 44 | }; 45 | -------------------------------------------------------------------------------- /config/gutenberg/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const AssetsQueue = require('./assets-queue.js'); 4 | 5 | const vendorScripts = require('./vendor.json'); 6 | const gutenbergScripts = require('./scripts.json'); 7 | const gutenbergStyles = require('./styles.json'); 8 | 9 | const vendorFolder = './public/vendor'; 10 | const gutenbergFolder = vendorFolder + '/gutenberg'; 11 | 12 | module.exports = function getGutenbergAssets () { 13 | const depsScripts = new AssetsQueue(); 14 | const depsStyles = new AssetsQueue(); 15 | 16 | // Enqueue vendor js 17 | for (const script in vendorScripts) { 18 | depsScripts.enqueue(script, 19 | gutenbergFolder + '/vendor/' + script + '.min.js', 20 | vendorScripts[script]); 21 | } 22 | 23 | // Enqueue local js 24 | depsScripts.enqueue('no-conflict', 25 | vendorFolder + '/no-conflict.js', 26 | ['lodash']); 27 | 28 | depsScripts.enqueue('g-data', 29 | vendorFolder + '/g-data.js', 30 | ['wp-data']); 31 | 32 | // Enqueue wp-packages js 33 | for (const script in gutenbergScripts) { 34 | // depsScripts.enqueue(script, 35 | // gutenbergFolder + '/' + script + '.min.js', 36 | // gutenbergScripts[script]); 37 | 38 | const name = 'wp-' + script.replace('.js', ''); 39 | // console.log(name); 40 | // console.log(gutenbergFolder + '/' + name + '.min.js'); 41 | // console.log(gutenbergScripts[script].dependencies); 42 | 43 | depsScripts.enqueue(name, 44 | gutenbergFolder + '/' + name + '.min.js', 45 | gutenbergScripts[script].dependencies); 46 | } 47 | 48 | // Enqueue style 49 | depsStyles.enqueue('wp-block-library-theme', 50 | gutenbergFolder + '/styles/wp-block-library/theme.min.css', 51 | []); 52 | 53 | depsStyles.enqueue('wp-edit-blocks', 54 | gutenbergFolder + '/styles/wp-block-library/editor.min.css', 55 | ['wp-components', 'wp-editor', 'wp-block-library', 'wp-block-library-theme']); 56 | 57 | for (const style in gutenbergStyles) { 58 | const name = `wp-${style}`; 59 | depsStyles.enqueue(name, 60 | gutenbergFolder + '/styles/' + name + '/style.min.css', 61 | gutenbergStyles[style]); 62 | } 63 | 64 | // console.log(depsScripts.getPaths()); 65 | return { 66 | scripts: depsScripts.getPaths(), 67 | styles: depsStyles.getPaths(), 68 | }; 69 | }; 70 | -------------------------------------------------------------------------------- /config/gutenberg/styles.json: -------------------------------------------------------------------------------- 1 | { 2 | "block-editor": [ "wp-components", "wp-editor-font" ], 3 | "block-library": [], 4 | "components": [], 5 | "edit-post": [ "wp-components", "wp-block-editor", "wp-editor", 6 | "wp-edit-blocks", "wp-block-library", "wp-nux" ], 7 | "editor": [ "wp-components", "wp-block-editor", "wp-nux" ], 8 | "format-library": [], 9 | "list-reusable-blocks": [ "wp-components" ], 10 | "nux": [ "wp-components" ] 11 | } 12 | -------------------------------------------------------------------------------- /config/gutenberg/update.sh: -------------------------------------------------------------------------------- 1 | read -p 'WordPress tag (enter): ' tag_name 2 | 3 | # Go to tmp folder 4 | [[ -d tmp ]] || mkdir tmp 5 | cd tmp 6 | 7 | # Get wordpress 8 | [[ -d WordPress ]] ||git clone git@github.com:WordPress/WordPress.git 9 | cd WordPress 10 | 11 | git fetch 12 | 13 | if test "$tag_name" != ''; then 14 | git checkout -b $tag_name tags/$tag_name 15 | else 16 | git checkout master 17 | git pull 18 | fi 19 | 20 | # Back to root 21 | cd ../.. 22 | 23 | # Clean up 24 | rm -rf public/vendor/gutenberg/ 25 | mkdir public/vendor/gutenberg/ 26 | 27 | # Generating scripts.json with gutenberg js packages and dependencies 28 | node scripts/g-scripts.js 29 | 30 | # Copy gutenberg packages js 31 | cp tmp/WordPress/wp-includes/js/dist/* public/vendor/gutenberg/ 32 | 33 | # Add packages prefixes (ex: ally.js => wp-a11y.js) 34 | cd public/vendor/gutenberg/ 35 | for f in * ; do mv -- "$f" "wp-$f" ; done 36 | cd - 37 | 38 | # Copy vendor (lodash, react, etc) 39 | cp -Rf tmp/WordPress/wp-includes/js/dist/vendor/ public/vendor/gutenberg/vendor 40 | 41 | # Copy packages css 42 | cp -Rf tmp/WordPress/wp-includes/css/dist/ public/vendor/gutenberg/styles/ 43 | 44 | # Add packages prefixes (ex: wp-block-editor) 45 | cd public/vendor/gutenberg/styles 46 | for f in * ; do mv -- "$f" "wp-$f" ; done 47 | -------------------------------------------------------------------------------- /config/gutenberg/vendor.json: -------------------------------------------------------------------------------- 1 | { 2 | "react": ["wp-polyfill"], 3 | "react-dom": ["react"], 4 | "moment": [], 5 | "lodash": [], 6 | "wp-polyfill-fetch": [], 7 | "wp-polyfill-formdata": [], 8 | "wp-polyfill-node-contains": [], 9 | "wp-polyfill-url": [], 10 | "wp-polyfill-dom-rect": [], 11 | "wp-polyfill-element-closest": [], 12 | "wp-polyfill": [] 13 | } 14 | -------------------------------------------------------------------------------- /config/jest/cssTransform.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | // This is a custom Jest transformer turning style imports into empty objects. 4 | // http://facebook.github.io/jest/docs/en/webpack.html 5 | 6 | module.exports = { 7 | process() { 8 | return 'module.exports = {};'; 9 | }, 10 | getCacheKey() { 11 | // The output is always the same. 12 | return 'cssTransform'; 13 | }, 14 | }; 15 | -------------------------------------------------------------------------------- /config/jest/fileTransform.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const path = require('path'); 4 | 5 | // This is a custom Jest transformer turning file imports into filenames. 6 | // http://facebook.github.io/jest/docs/en/webpack.html 7 | 8 | module.exports = { 9 | process(src, filename) { 10 | const assetFilename = JSON.stringify(path.basename(filename)); 11 | 12 | if (filename.match(/\.svg$/)) { 13 | return `module.exports = { 14 | __esModule: true, 15 | default: ${assetFilename}, 16 | ReactComponent: (props) => ({ 17 | $$typeof: Symbol.for('react.element'), 18 | type: 'svg', 19 | ref: null, 20 | key: null, 21 | props: Object.assign({}, props, { 22 | children: ${assetFilename} 23 | }) 24 | }), 25 | };`; 26 | } 27 | 28 | return `module.exports = ${assetFilename};`; 29 | }, 30 | }; 31 | -------------------------------------------------------------------------------- /config/paths.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const path = require('path'); 4 | const fs = require('fs'); 5 | const url = require('url'); 6 | 7 | // Make sure any symlinks in the project folder are resolved: 8 | // https://github.com/facebook/create-react-app/issues/637 9 | const appDirectory = fs.realpathSync(process.cwd()); 10 | const resolveApp = relativePath => path.resolve(appDirectory, relativePath); 11 | 12 | const envPublicUrl = process.env.PUBLIC_URL; 13 | const envBuildUrl = process.env.BUILD_DIR; 14 | 15 | function ensureSlash(inputPath, needsSlash) { 16 | const hasSlash = inputPath.endsWith('/'); 17 | if (hasSlash && !needsSlash) { 18 | return inputPath.substr(0, inputPath.length - 1); 19 | } else if (!hasSlash && needsSlash) { 20 | return `${inputPath}/`; 21 | } else { 22 | return inputPath; 23 | } 24 | } 25 | 26 | const getPublicUrl = () => envPublicUrl || '/'; 27 | 28 | // We use `PUBLIC_URL` environment variable or "homepage" field to infer 29 | // "public path" at which the app is served. 30 | // Webpack needs to know it to put the right -------------------------------------------------------------------------------- /g-styles.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@frontkom/g-editor", 3 | "version": "1.6.0", 4 | "description": "A minimalist version of Gutenberg's editor. Ideal for testing custom blocks.", 5 | "author": "Frontkom ", 6 | "private": false, 7 | "main": "build/index.js", 8 | "files": [ 9 | "build/", 10 | "config/", 11 | "public/", 12 | "scripts/", 13 | "src/", 14 | ".eslintignore", 15 | ".eslintrc", 16 | "g-scripts.txt", 17 | "g-styles.txt" 18 | ], 19 | "dependencies": { 20 | "@babel/core": "7.2.2", 21 | "@svgr/webpack": "2.4.1", 22 | "babel-core": "7.0.0-bridge.0", 23 | "babel-eslint": "9.0.0", 24 | "babel-jest": "^25.1.0", 25 | "babel-loader": "8.0.5", 26 | "babel-plugin-named-asset-import": "^0.2.2", 27 | "babel-preset-react-app": "^5.0.4", 28 | "bfj": "6.1.1", 29 | "case-sensitive-paths-webpack-plugin": "2.1.2", 30 | "chalk": "2.4.2", 31 | "css-loader": "1.0.0", 32 | "dotenv": "6.2.0", 33 | "dotenv-expand": "4.2.0", 34 | "eslint": "5.12.0", 35 | "eslint-config-react-app": "^3.0.4", 36 | "eslint-loader": "2.1.1", 37 | "eslint-plugin-flowtype": "2.50.1", 38 | "eslint-plugin-import": "2.14.0", 39 | "eslint-plugin-jsx-a11y": "6.1.2", 40 | "eslint-plugin-react": "7.12.3", 41 | "file-loader": "2.0.0", 42 | "fs-extra": "7.0.1", 43 | "html-webpack-plugin": "4.0.0-alpha.2", 44 | "identity-obj-proxy": "3.0.0", 45 | "jest": "^25.1.0", 46 | "jest-pnp-resolver": "1.0.2", 47 | "jest-resolve": "23.6.0", 48 | "mini-css-extract-plugin": "0.4.3", 49 | "node-sass": "^4.14.1", 50 | "oembed-providers": "^1.0.20170414", 51 | "optimize-css-assets-webpack-plugin": "5.0.1", 52 | "pnp-webpack-plugin": "1.2.1", 53 | "postcss-flexbugs-fixes": "4.1.0", 54 | "postcss-loader": "3.0.0", 55 | "postcss-preset-env": "6.5.0", 56 | "postcss-safe-parser": "4.0.1", 57 | "react-app-polyfill": "^0.1.3", 58 | "react-dev-utils": "^6.0.5", 59 | "react-router-dom": "^4.3.1", 60 | "resolve": "1.9.0", 61 | "sass-loader": "7.1.0", 62 | "style-loader": "0.23.1", 63 | "terser-webpack-plugin": "^2.3.4", 64 | "url-loader": "1.1.2", 65 | "webpack": "4.28.4", 66 | "webpack-cli": "^3.1.2", 67 | "webpack-dev-server": "^3.11.0", 68 | "webpack-manifest-plugin": "2.0.4", 69 | "workbox-webpack-plugin": "3.6.3" 70 | }, 71 | "devDependencies": { 72 | "eslint": "^5.4.0", 73 | "eslint-plugin-react": "^7.11.1" 74 | }, 75 | "scripts": { 76 | "start": "node scripts/start.js", 77 | "build": "node scripts/build.js", 78 | "test": "node scripts/test.js", 79 | "lint": "eslint .", 80 | "lint:fix": "eslint . --fix", 81 | "deploy": "npm run lint && npm publish --access public", 82 | "preg-update": "./config/gutenberg/update.sh", 83 | "g-update": "node scripts/g-update.js" 84 | }, 85 | "bugs": { 86 | "url": "https://github.com/front/g-editor/issues" 87 | }, 88 | "repository": { 89 | "type": "git", 90 | "url": "git+https://github.com/front/g-editor.git" 91 | }, 92 | "browserslist": [ 93 | ">0.2%", 94 | "not dead", 95 | "not ie <= 11", 96 | "not op_mini all" 97 | ], 98 | "babel": { 99 | "presets": [ 100 | "react-app" 101 | ] 102 | }, 103 | "jest": { 104 | "collectCoverageFrom": [ 105 | "src/**/*.{js,jsx}" 106 | ], 107 | "resolver": "jest-pnp-resolver", 108 | "setupFiles": [ 109 | "react-app-polyfill/jsdom" 110 | ], 111 | "testMatch": [ 112 | "/src/**/__tests__/**/*.{js,jsx}", 113 | "/src/**/?(*.)(spec|test).{js,jsx}" 114 | ], 115 | "testEnvironment": "jsdom", 116 | "testURL": "http://localhost", 117 | "transform": { 118 | "^.+\\.(js|jsx)$": "/node_modules/babel-jest", 119 | "^.+\\.css$": "/config/jest/cssTransform.js", 120 | "^(?!.*\\.(js|jsx|css|json)$)": "/config/jest/fileTransform.js" 121 | }, 122 | "transformIgnorePatterns": [ 123 | "[/\\\\]node_modules[/\\\\].+\\.(js|jsx)$", 124 | "^.+\\.module\\.(css|sass|scss)$" 125 | ], 126 | "moduleNameMapper": { 127 | "^react-native$": "react-native-web", 128 | "^.+\\.module\\.(css|sass|scss)$": "identity-obj-proxy" 129 | }, 130 | "moduleFileExtensions": [ 131 | "web.js", 132 | "js", 133 | "json", 134 | "web.jsx", 135 | "jsx", 136 | "node" 137 | ] 138 | } 139 | } 140 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/front/g-editor/acf8d8793f530c2154bd0f04ea961295d5ad8ab2/public/favicon.ico -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 12 | 13 | 22 | 23 | 24 | <%= htmlWebpackPlugin.options.gutenbergStyle %> 25 | 26 | 27 | 30 | 33 | g-editor 34 | 35 | 36 | 37 | <%= htmlWebpackPlugin.options.gutenbergScripts %> 38 | 39 | 42 |
43 | 53 | 54 | 55 | 58 | 59 | -------------------------------------------------------------------------------- /public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "g-editor", 3 | "name": "A minimalist version of Gutenberg's editor. Ideal for checking your custom blocks.", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | } 10 | ], 11 | "start_url": ".", 12 | "display": "standalone", 13 | "theme_color": "#000000", 14 | "background_color": "#ffffff" 15 | } 16 | -------------------------------------------------------------------------------- /public/media/audio1-thumb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/front/g-editor/acf8d8793f530c2154bd0f04ea961295d5ad8ab2/public/media/audio1-thumb.png -------------------------------------------------------------------------------- /public/media/audio1.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/front/g-editor/acf8d8793f530c2154bd0f04ea961295d5ad8ab2/public/media/audio1.mp3 -------------------------------------------------------------------------------- /public/media/img1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/front/g-editor/acf8d8793f530c2154bd0f04ea961295d5ad8ab2/public/media/img1.jpg -------------------------------------------------------------------------------- /public/media/img2.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/front/g-editor/acf8d8793f530c2154bd0f04ea961295d5ad8ab2/public/media/img2.jpeg -------------------------------------------------------------------------------- /public/media/img3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/front/g-editor/acf8d8793f530c2154bd0f04ea961295d5ad8ab2/public/media/img3.png -------------------------------------------------------------------------------- /public/media/video1-thumb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/front/g-editor/acf8d8793f530c2154bd0f04ea961295d5ad8ab2/public/media/video1-thumb.jpg -------------------------------------------------------------------------------- /public/media/video1.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/front/g-editor/acf8d8793f530c2154bd0f04ea961295d5ad8ab2/public/media/video1.mp4 -------------------------------------------------------------------------------- /public/media/video2-thumb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/front/g-editor/acf8d8793f530c2154bd0f04ea961295d5ad8ab2/public/media/video2-thumb.jpg -------------------------------------------------------------------------------- /public/media/video2.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/front/g-editor/acf8d8793f530c2154bd0f04ea961295d5ad8ab2/public/media/video2.mp4 -------------------------------------------------------------------------------- /public/vendor/g-data.js: -------------------------------------------------------------------------------- 1 | (function (wp) { 2 | const { use, plugins } = wp.data; 3 | 4 | const uid = (window.userSettings && window.userSettings.uid) || 1; 5 | const storageKey = `WP_DATA_USER_${uid}`; 6 | 7 | use(plugins.persistence, { storageKey }); 8 | plugins.persistence.__unstableMigrate({ storageKey }); 9 | 10 | })(window.wp); 11 | -------------------------------------------------------------------------------- /public/vendor/gutenberg/styles/wp-block-directory/style-rtl.min.css: -------------------------------------------------------------------------------- 1 | :root{--wp-admin-theme-color:#007cba;--wp-admin-theme-color-darker-10:#006ba1;--wp-admin-theme-color-darker-20:#005a87}.block-directory-block-ratings{display:flex}.block-directory-block-ratings>div{line-height:1;display:flex}.block-directory-block-ratings .block-directory-block-ratings__rating-count{color:#606a73;font-size:ms(-2)}.block-directory-block-ratings svg{fill:#ffb900}.block-directory-compact-list{margin:0;list-style:none}.block-directory-compact-list__item{display:flex;flex-direction:row;align-items:center;margin-bottom:16px}.block-directory-compact-list__item:last-child{margin-bottom:0}.block-directory-compact-list__item-details{margin-right:8px}.block-directory-compact-list__item-title{font-weight:500}.block-directory-compact-list__item-author{color:#555d66;font-size:11px}.block-directory-downloadable-block-author-info__content{color:#606a73;font-size:12px}.block-directory-downloadable-block-author-info__content-author{margin-bottom:4px;font-size:13px}.block-directory-downloadable-block-header__row{display:flex;flex-grow:1}.block-directory-downloadable-block-header__row .block-directory-downloadable-block-header__column{display:flex;flex-direction:column;flex-grow:1;padding-right:12px}.block-directory-downloadable-block-header__title{margin:0;font-size:13px;color:currentColor}.block-directory-downloadable-block-icon{width:36px;height:36px}.block-directory-downloadable-block-icon .block-editor-block-icon{width:36px;height:36px;font-size:36px;background-color:#ddd}.block-directory-downloadable-block-info__content{margin:0 0 16px;font-size:13px}.block-directory-downloadable-block-info__meta{display:flex;align-items:center;margin-bottom:2px;color:#606a73;font-size:12px}.block-directory-downloadable-block-info__meta:last-child{margin-bottom:0}.block-directory-downloadable-block-info__icon{margin-left:4px;fill:#606a73}.block-directory-downloadable-block-list-item{width:100%;padding:0;margin:0;display:flex;flex-direction:row;font-size:13px;color:#32373c;align-items:flex-start;justify-content:center;background:transparent;word-break:break-word;border-top:1px solid #ddd;border-bottom:1px solid #ddd;transition:all .05s ease-in-out;position:relative;text-align:right;overflow:hidden}@media (prefers-reduced-motion:reduce){.block-directory-downloadable-block-list-item{transition-duration:0s}}.block-directory-downloadable-block-list-item+.block-directory-downloadable-block-list-item{border-top:none}.block-directory-downloadable-block-list-item:last-child:not(:only-of-type){border-top:0}.block-directory-downloadable-block-list-item:last-child{border-bottom:0}.block-directory-downloadable-block-list-item__panel{display:flex;flex-grow:1;flex-direction:column}.block-directory-downloadable-block-list-item__header{display:flex;flex-direction:column;padding:16px 16px 0}.block-directory-downloadable-block-list-item__body{display:flex;flex-direction:column;padding:16px}.block-directory-downloadable-block-list-item__footer{display:flex;flex-direction:column;padding:16px;background-color:#f0f0f0}.block-directory-downloadable-block-list-item__content{color:#606a73}.block-directory-downloadable-block-notice{margin:0 0 16px}.block-directory-downloadable-block-notice__content{padding-left:12px;margin-bottom:8px}.block-directory-downloadable-blocks-list{list-style:none;margin:0;overflow:hidden;display:flex;flex-wrap:wrap}.block-directory-downloadable-blocks-panel__description{font-style:italic;padding:16px;margin:0;text-align:right;color:#606a73}.block-directory-downloadable-blocks-panel__description.has-no-results{font-style:normal;padding:0;margin:112px 0;text-align:center;color:#606a73}.block-directory-downloadable-blocks-panel__description.has-no-results .components-spinner{float:inherit}.installed-blocks-pre-publish-panel__copy{margin-top:0} -------------------------------------------------------------------------------- /public/vendor/gutenberg/styles/wp-block-directory/style.min.css: -------------------------------------------------------------------------------- 1 | :root{--wp-admin-theme-color:#007cba;--wp-admin-theme-color-darker-10:#006ba1;--wp-admin-theme-color-darker-20:#005a87}.block-directory-block-ratings{display:flex}.block-directory-block-ratings>div{line-height:1;display:flex}.block-directory-block-ratings .block-directory-block-ratings__rating-count{color:#606a73;font-size:ms(-2)}.block-directory-block-ratings svg{fill:#ffb900}.block-directory-compact-list{margin:0;list-style:none}.block-directory-compact-list__item{display:flex;flex-direction:row;align-items:center;margin-bottom:16px}.block-directory-compact-list__item:last-child{margin-bottom:0}.block-directory-compact-list__item-details{margin-left:8px}.block-directory-compact-list__item-title{font-weight:500}.block-directory-compact-list__item-author{color:#555d66;font-size:11px}.block-directory-downloadable-block-author-info__content{color:#606a73;font-size:12px}.block-directory-downloadable-block-author-info__content-author{margin-bottom:4px;font-size:13px}.block-directory-downloadable-block-header__row{display:flex;flex-grow:1}.block-directory-downloadable-block-header__row .block-directory-downloadable-block-header__column{display:flex;flex-direction:column;flex-grow:1;padding-left:12px}.block-directory-downloadable-block-header__title{margin:0;font-size:13px;color:currentColor}.block-directory-downloadable-block-icon{width:36px;height:36px}.block-directory-downloadable-block-icon .block-editor-block-icon{width:36px;height:36px;font-size:36px;background-color:#ddd}.block-directory-downloadable-block-info__content{margin:0 0 16px;font-size:13px}.block-directory-downloadable-block-info__meta{display:flex;align-items:center;margin-bottom:2px;color:#606a73;font-size:12px}.block-directory-downloadable-block-info__meta:last-child{margin-bottom:0}.block-directory-downloadable-block-info__icon{margin-right:4px;fill:#606a73}.block-directory-downloadable-block-list-item{width:100%;padding:0;margin:0;display:flex;flex-direction:row;font-size:13px;color:#32373c;align-items:flex-start;justify-content:center;background:transparent;word-break:break-word;border-top:1px solid #ddd;border-bottom:1px solid #ddd;transition:all .05s ease-in-out;position:relative;text-align:left;overflow:hidden}@media (prefers-reduced-motion:reduce){.block-directory-downloadable-block-list-item{transition-duration:0s}}.block-directory-downloadable-block-list-item+.block-directory-downloadable-block-list-item{border-top:none}.block-directory-downloadable-block-list-item:last-child:not(:only-of-type){border-top:0}.block-directory-downloadable-block-list-item:last-child{border-bottom:0}.block-directory-downloadable-block-list-item__panel{display:flex;flex-grow:1;flex-direction:column}.block-directory-downloadable-block-list-item__header{display:flex;flex-direction:column;padding:16px 16px 0}.block-directory-downloadable-block-list-item__body{display:flex;flex-direction:column;padding:16px}.block-directory-downloadable-block-list-item__footer{display:flex;flex-direction:column;padding:16px;background-color:#f0f0f0}.block-directory-downloadable-block-list-item__content{color:#606a73}.block-directory-downloadable-block-notice{margin:0 0 16px}.block-directory-downloadable-block-notice__content{padding-right:12px;margin-bottom:8px}.block-directory-downloadable-blocks-list{list-style:none;margin:0;overflow:hidden;display:flex;flex-wrap:wrap}.block-directory-downloadable-blocks-panel__description{font-style:italic;padding:16px;margin:0;text-align:left;color:#606a73}.block-directory-downloadable-blocks-panel__description.has-no-results{font-style:normal;padding:0;margin:112px 0;text-align:center;color:#606a73}.block-directory-downloadable-blocks-panel__description.has-no-results .components-spinner{float:inherit}.installed-blocks-pre-publish-panel__copy{margin-top:0} -------------------------------------------------------------------------------- /public/vendor/gutenberg/styles/wp-block-library/theme-rtl.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Colors 3 | */ 4 | /** 5 | * Deprecated colors. 6 | * Please avoid using these. 7 | */ 8 | /** 9 | * Breakpoints & Media Queries 10 | */ 11 | /** 12 | * Colors 13 | */ 14 | /** 15 | * Deprecated colors. 16 | * Please avoid using these. 17 | */ 18 | /** 19 | * Fonts & basic variables. 20 | */ 21 | /** 22 | * Grid System. 23 | * https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/ 24 | */ 25 | /** 26 | * Dimensions. 27 | */ 28 | /** 29 | * Shadows. 30 | */ 31 | /** 32 | * Editor widths. 33 | */ 34 | /** 35 | * Block UI. 36 | */ 37 | /** 38 | * Border radii. 39 | */ 40 | /** 41 | * Breakpoint mixins 42 | */ 43 | /** 44 | * Long content fade mixin 45 | * 46 | * Creates a fading overlay to signify that the content is longer 47 | * than the space allows. 48 | */ 49 | /** 50 | * Focus styles. 51 | */ 52 | /** 53 | * Applies editor left position to the selector passed as argument 54 | */ 55 | /** 56 | * Styles that are reused verbatim in a few places 57 | */ 58 | /** 59 | * Allows users to opt-out of animations via OS-level preferences. 60 | */ 61 | /** 62 | * Reset default styles for JavaScript UI based pages. 63 | * This is a WP-admin agnostic reset 64 | */ 65 | /** 66 | * Reset the WP Admin page styles for Gutenberg-like pages. 67 | */ 68 | :root { 69 | --wp-admin-theme-color: #007cba; 70 | --wp-admin-theme-color-darker-10: #006ba1; 71 | --wp-admin-theme-color-darker-20: #005a87; } 72 | 73 | #start-resizable-editor-section { 74 | display: none; } 75 | 76 | .wp-block-audio figcaption { 77 | color: #555d66; 78 | font-size: 13px; 79 | text-align: center; } 80 | 81 | .wp-block-code { 82 | font-family: Menlo, Consolas, monaco, monospace; 83 | font-size: 15px; 84 | color: #1e1e1e; 85 | padding: 0.8em 1em; 86 | border: 1px solid #ddd; 87 | border-radius: 4px; } 88 | 89 | .wp-block-embed figcaption { 90 | color: #555d66; 91 | font-size: 13px; 92 | text-align: center; } 93 | 94 | .blocks-gallery-caption { 95 | color: #555d66; 96 | font-size: 13px; 97 | text-align: center; } 98 | 99 | .wp-block-image figcaption { 100 | color: #555d66; 101 | font-size: 13px; 102 | text-align: center; } 103 | 104 | .wp-block-pullquote { 105 | border-top: 4px solid #555d66; 106 | border-bottom: 4px solid #555d66; 107 | margin-bottom: 28px; 108 | color: #40464d; } 109 | .wp-block-pullquote cite, 110 | .wp-block-pullquote footer, .wp-block-pullquote__citation { 111 | color: #40464d; 112 | text-transform: uppercase; 113 | font-size: 13px; 114 | font-style: normal; } 115 | 116 | .wp-block-navigation ul, 117 | .wp-block-navigation ul li { 118 | list-style: none; } 119 | 120 | .wp-block-navigation-link.wp-block-navigation-link { 121 | margin: 0; } 122 | 123 | .wp-block-quote { 124 | border-right: 4px solid #000; 125 | margin: 0 0 28px 0; 126 | padding-right: 1em; } 127 | .wp-block-quote cite, 128 | .wp-block-quote footer, .wp-block-quote__citation { 129 | color: #6c7781; 130 | font-size: 13px; 131 | margin-top: 1em; 132 | position: relative; 133 | font-style: normal; } 134 | .wp-block-quote.has-text-align-right, .wp-block-quote.has-text-align-right { 135 | border-right: none; 136 | border-left: 4px solid #000; 137 | padding-right: 0; 138 | padding-left: 1em; } 139 | .wp-block-quote.has-text-align-center, .wp-block-quote.has-text-align-center { 140 | border: none; 141 | padding-right: 0; } 142 | .wp-block-quote.is-style-large, .wp-block-quote.is-large { 143 | border: none; } 144 | 145 | .wp-block-search .wp-block-search__label { 146 | font-weight: bold; } 147 | 148 | .wp-block-group.has-background { 149 | padding: 20px 30px; 150 | margin-top: 0; 151 | margin-bottom: 0; } 152 | 153 | .wp-block-separator { 154 | border: none; 155 | border-bottom: 2px solid #8f98a1; 156 | margin-right: auto; 157 | margin-left: auto; } 158 | .wp-block-separator:not(.is-style-wide):not(.is-style-dots) { 159 | max-width: 100px; } 160 | .wp-block-separator.has-background:not(.is-style-dots) { 161 | border-bottom: none; 162 | height: 1px; } 163 | .wp-block-separator.has-background:not(.is-style-wide):not(.is-style-dots) { 164 | height: 2px; } 165 | 166 | .wp-block-table { 167 | border-collapse: collapse; } 168 | .wp-block-table thead { 169 | border-bottom: 3px solid; } 170 | .wp-block-table tfoot { 171 | border-top: 3px solid; } 172 | .wp-block-table td, 173 | .wp-block-table th { 174 | padding: 0.5em; 175 | border: 1px solid; 176 | word-break: normal; } 177 | .wp-block-table figcaption { 178 | color: #555d66; 179 | font-size: 13px; 180 | text-align: center; } 181 | 182 | .wp-block-video figcaption { 183 | color: #555d66; 184 | font-size: 13px; 185 | text-align: center; } 186 | 187 | #end-resizable-editor-section { 188 | display: none; } 189 | -------------------------------------------------------------------------------- /public/vendor/gutenberg/styles/wp-block-library/theme-rtl.min.css: -------------------------------------------------------------------------------- 1 | :root{--wp-admin-theme-color:#007cba;--wp-admin-theme-color-darker-10:#006ba1;--wp-admin-theme-color-darker-20:#005a87}#start-resizable-editor-section{display:none}.wp-block-audio figcaption{color:#555d66;font-size:13px;text-align:center}.wp-block-code{font-family:Menlo,Consolas,monaco,monospace;font-size:15px;color:#1e1e1e;padding:.8em 1em;border:1px solid #ddd;border-radius:4px}.blocks-gallery-caption,.wp-block-embed figcaption,.wp-block-image figcaption{color:#555d66;font-size:13px;text-align:center}.wp-block-pullquote{border-top:4px solid #555d66;border-bottom:4px solid #555d66;margin-bottom:28px;color:#40464d}.wp-block-pullquote__citation,.wp-block-pullquote cite,.wp-block-pullquote footer{color:#40464d;text-transform:uppercase;font-size:13px;font-style:normal}.wp-block-navigation ul,.wp-block-navigation ul li{list-style:none}.wp-block-navigation-link.wp-block-navigation-link{margin:0}.wp-block-quote{border-right:4px solid #000;margin:0 0 28px;padding-right:1em}.wp-block-quote__citation,.wp-block-quote cite,.wp-block-quote footer{color:#6c7781;font-size:13px;margin-top:1em;position:relative;font-style:normal}.wp-block-quote.has-text-align-right{border-right:none;border-left:4px solid #000;padding-right:0;padding-left:1em}.wp-block-quote.has-text-align-center{border:none;padding-right:0}.wp-block-quote.is-large,.wp-block-quote.is-style-large{border:none}.wp-block-search .wp-block-search__label{font-weight:700}.wp-block-group.has-background{padding:20px 30px;margin-top:0;margin-bottom:0}.wp-block-separator{border:none;border-bottom:2px solid #8f98a1;margin-right:auto;margin-left:auto}.wp-block-separator:not(.is-style-wide):not(.is-style-dots){max-width:100px}.wp-block-separator.has-background:not(.is-style-dots){border-bottom:none;height:1px}.wp-block-separator.has-background:not(.is-style-wide):not(.is-style-dots){height:2px}.wp-block-table{border-collapse:collapse}.wp-block-table thead{border-bottom:3px solid}.wp-block-table tfoot{border-top:3px solid}.wp-block-table td,.wp-block-table th{padding:.5em;border:1px solid;word-break:normal}.wp-block-table figcaption,.wp-block-video figcaption{color:#555d66;font-size:13px;text-align:center}#end-resizable-editor-section{display:none} -------------------------------------------------------------------------------- /public/vendor/gutenberg/styles/wp-block-library/theme.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Colors 3 | */ 4 | /** 5 | * Deprecated colors. 6 | * Please avoid using these. 7 | */ 8 | /** 9 | * Breakpoints & Media Queries 10 | */ 11 | /** 12 | * Colors 13 | */ 14 | /** 15 | * Deprecated colors. 16 | * Please avoid using these. 17 | */ 18 | /** 19 | * Fonts & basic variables. 20 | */ 21 | /** 22 | * Grid System. 23 | * https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/ 24 | */ 25 | /** 26 | * Dimensions. 27 | */ 28 | /** 29 | * Shadows. 30 | */ 31 | /** 32 | * Editor widths. 33 | */ 34 | /** 35 | * Block UI. 36 | */ 37 | /** 38 | * Border radii. 39 | */ 40 | /** 41 | * Breakpoint mixins 42 | */ 43 | /** 44 | * Long content fade mixin 45 | * 46 | * Creates a fading overlay to signify that the content is longer 47 | * than the space allows. 48 | */ 49 | /** 50 | * Focus styles. 51 | */ 52 | /** 53 | * Applies editor left position to the selector passed as argument 54 | */ 55 | /** 56 | * Styles that are reused verbatim in a few places 57 | */ 58 | /** 59 | * Allows users to opt-out of animations via OS-level preferences. 60 | */ 61 | /** 62 | * Reset default styles for JavaScript UI based pages. 63 | * This is a WP-admin agnostic reset 64 | */ 65 | /** 66 | * Reset the WP Admin page styles for Gutenberg-like pages. 67 | */ 68 | :root { 69 | --wp-admin-theme-color: #007cba; 70 | --wp-admin-theme-color-darker-10: #006ba1; 71 | --wp-admin-theme-color-darker-20: #005a87; } 72 | 73 | #start-resizable-editor-section { 74 | display: none; } 75 | 76 | .wp-block-audio figcaption { 77 | color: #555d66; 78 | font-size: 13px; 79 | text-align: center; } 80 | 81 | .wp-block-code { 82 | font-family: Menlo, Consolas, monaco, monospace; 83 | font-size: 15px; 84 | color: #1e1e1e; 85 | padding: 0.8em 1em; 86 | border: 1px solid #ddd; 87 | border-radius: 4px; } 88 | 89 | .wp-block-embed figcaption { 90 | color: #555d66; 91 | font-size: 13px; 92 | text-align: center; } 93 | 94 | .blocks-gallery-caption { 95 | color: #555d66; 96 | font-size: 13px; 97 | text-align: center; } 98 | 99 | .wp-block-image figcaption { 100 | color: #555d66; 101 | font-size: 13px; 102 | text-align: center; } 103 | 104 | .wp-block-pullquote { 105 | border-top: 4px solid #555d66; 106 | border-bottom: 4px solid #555d66; 107 | margin-bottom: 28px; 108 | color: #40464d; } 109 | .wp-block-pullquote cite, 110 | .wp-block-pullquote footer, .wp-block-pullquote__citation { 111 | color: #40464d; 112 | text-transform: uppercase; 113 | font-size: 13px; 114 | font-style: normal; } 115 | 116 | .wp-block-navigation ul, 117 | .wp-block-navigation ul li { 118 | list-style: none; } 119 | 120 | .wp-block-navigation-link.wp-block-navigation-link { 121 | margin: 0; } 122 | 123 | .wp-block-quote { 124 | border-left: 4px solid #000; 125 | margin: 0 0 28px 0; 126 | padding-left: 1em; } 127 | .wp-block-quote cite, 128 | .wp-block-quote footer, .wp-block-quote__citation { 129 | color: #6c7781; 130 | font-size: 13px; 131 | margin-top: 1em; 132 | position: relative; 133 | font-style: normal; } 134 | .wp-block-quote.has-text-align-right, .wp-block-quote.has-text-align-right { 135 | border-left: none; 136 | border-right: 4px solid #000; 137 | padding-left: 0; 138 | padding-right: 1em; } 139 | .wp-block-quote.has-text-align-center, .wp-block-quote.has-text-align-center { 140 | border: none; 141 | padding-left: 0; } 142 | .wp-block-quote.is-style-large, .wp-block-quote.is-large { 143 | border: none; } 144 | 145 | .wp-block-search .wp-block-search__label { 146 | font-weight: bold; } 147 | 148 | .wp-block-group.has-background { 149 | padding: 20px 30px; 150 | margin-top: 0; 151 | margin-bottom: 0; } 152 | 153 | .wp-block-separator { 154 | border: none; 155 | border-bottom: 2px solid #8f98a1; 156 | margin-left: auto; 157 | margin-right: auto; } 158 | .wp-block-separator:not(.is-style-wide):not(.is-style-dots) { 159 | max-width: 100px; } 160 | .wp-block-separator.has-background:not(.is-style-dots) { 161 | border-bottom: none; 162 | height: 1px; } 163 | .wp-block-separator.has-background:not(.is-style-wide):not(.is-style-dots) { 164 | height: 2px; } 165 | 166 | .wp-block-table { 167 | border-collapse: collapse; } 168 | .wp-block-table thead { 169 | border-bottom: 3px solid; } 170 | .wp-block-table tfoot { 171 | border-top: 3px solid; } 172 | .wp-block-table td, 173 | .wp-block-table th { 174 | padding: 0.5em; 175 | border: 1px solid; 176 | word-break: normal; } 177 | .wp-block-table figcaption { 178 | color: #555d66; 179 | font-size: 13px; 180 | text-align: center; } 181 | 182 | .wp-block-video figcaption { 183 | color: #555d66; 184 | font-size: 13px; 185 | text-align: center; } 186 | 187 | #end-resizable-editor-section { 188 | display: none; } 189 | -------------------------------------------------------------------------------- /public/vendor/gutenberg/styles/wp-block-library/theme.min.css: -------------------------------------------------------------------------------- 1 | :root{--wp-admin-theme-color:#007cba;--wp-admin-theme-color-darker-10:#006ba1;--wp-admin-theme-color-darker-20:#005a87}#start-resizable-editor-section{display:none}.wp-block-audio figcaption{color:#555d66;font-size:13px;text-align:center}.wp-block-code{font-family:Menlo,Consolas,monaco,monospace;font-size:15px;color:#1e1e1e;padding:.8em 1em;border:1px solid #ddd;border-radius:4px}.blocks-gallery-caption,.wp-block-embed figcaption,.wp-block-image figcaption{color:#555d66;font-size:13px;text-align:center}.wp-block-pullquote{border-top:4px solid #555d66;border-bottom:4px solid #555d66;margin-bottom:28px;color:#40464d}.wp-block-pullquote__citation,.wp-block-pullquote cite,.wp-block-pullquote footer{color:#40464d;text-transform:uppercase;font-size:13px;font-style:normal}.wp-block-navigation ul,.wp-block-navigation ul li{list-style:none}.wp-block-navigation-link.wp-block-navigation-link{margin:0}.wp-block-quote{border-left:4px solid #000;margin:0 0 28px;padding-left:1em}.wp-block-quote__citation,.wp-block-quote cite,.wp-block-quote footer{color:#6c7781;font-size:13px;margin-top:1em;position:relative;font-style:normal}.wp-block-quote.has-text-align-right{border-left:none;border-right:4px solid #000;padding-left:0;padding-right:1em}.wp-block-quote.has-text-align-center{border:none;padding-left:0}.wp-block-quote.is-large,.wp-block-quote.is-style-large{border:none}.wp-block-search .wp-block-search__label{font-weight:700}.wp-block-group.has-background{padding:20px 30px;margin-top:0;margin-bottom:0}.wp-block-separator{border:none;border-bottom:2px solid #8f98a1;margin-left:auto;margin-right:auto}.wp-block-separator:not(.is-style-wide):not(.is-style-dots){max-width:100px}.wp-block-separator.has-background:not(.is-style-dots){border-bottom:none;height:1px}.wp-block-separator.has-background:not(.is-style-wide):not(.is-style-dots){height:2px}.wp-block-table{border-collapse:collapse}.wp-block-table thead{border-bottom:3px solid}.wp-block-table tfoot{border-top:3px solid}.wp-block-table td,.wp-block-table th{padding:.5em;border:1px solid;word-break:normal}.wp-block-table figcaption,.wp-block-video figcaption{color:#555d66;font-size:13px;text-align:center}#end-resizable-editor-section{display:none} -------------------------------------------------------------------------------- /public/vendor/gutenberg/styles/wp-editor/editor-styles-rtl.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Colors 3 | */ 4 | /** 5 | * Deprecated colors. 6 | * Please avoid using these. 7 | */ 8 | /** 9 | * Breakpoints & Media Queries 10 | */ 11 | /** 12 | * Colors 13 | */ 14 | /** 15 | * Deprecated colors. 16 | * Please avoid using these. 17 | */ 18 | /** 19 | * Fonts & basic variables. 20 | */ 21 | /** 22 | * Grid System. 23 | * https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/ 24 | */ 25 | /** 26 | * Dimensions. 27 | */ 28 | /** 29 | * Shadows. 30 | */ 31 | /** 32 | * Editor widths. 33 | */ 34 | /** 35 | * Block UI. 36 | */ 37 | /** 38 | * Border radii. 39 | */ 40 | /** 41 | * Breakpoint mixins 42 | */ 43 | /** 44 | * Long content fade mixin 45 | * 46 | * Creates a fading overlay to signify that the content is longer 47 | * than the space allows. 48 | */ 49 | /** 50 | * Focus styles. 51 | */ 52 | /** 53 | * Applies editor left position to the selector passed as argument 54 | */ 55 | /** 56 | * Styles that are reused verbatim in a few places 57 | */ 58 | /** 59 | * Allows users to opt-out of animations via OS-level preferences. 60 | */ 61 | /** 62 | * Reset default styles for JavaScript UI based pages. 63 | * This is a WP-admin agnostic reset 64 | */ 65 | /** 66 | * Reset the WP Admin page styles for Gutenberg-like pages. 67 | */ 68 | :root { 69 | --wp-admin-theme-color: #007cba; 70 | --wp-admin-theme-color-darker-10: #006ba1; 71 | --wp-admin-theme-color-darker-20: #005a87; } 72 | 73 | /** 74 | * Editor Normalization Styles 75 | * 76 | * These are only output in the editor, but styles here are prefixed .editor-styles-wrapper and affect the theming 77 | * of the editor by themes. 78 | * Why do these exist? Why not rely on browser defaults? 79 | * These styles are necessary so long as CSS can bleed from the wp-admin into the editing canvas itself. 80 | * Let's continue working to refactor these away, whether through Shadow DOM or better scoping of upstream styles. 81 | */ 82 | body { 83 | font-family: "Noto Serif", serif; 84 | font-size: 16px; 85 | line-height: 1.8; 86 | color: #1e1e1e; 87 | padding: 10px; } 88 | 89 | .block-editor-block-list__layout.is-root-container > .wp-block[data-align="full"] { 90 | margin-right: -10px; 91 | margin-left: -10px; } 92 | 93 | /* Headings */ 94 | h1 { 95 | font-size: 2.44em; } 96 | 97 | h2 { 98 | font-size: 1.95em; } 99 | 100 | h3 { 101 | font-size: 1.56em; } 102 | 103 | h4 { 104 | font-size: 1.25em; } 105 | 106 | h5 { 107 | font-size: 1em; } 108 | 109 | h6 { 110 | font-size: 0.8em; } 111 | 112 | h1, 113 | h2, 114 | h3 { 115 | line-height: 1.4; } 116 | 117 | h4 { 118 | line-height: 1.5; } 119 | 120 | h1 { 121 | margin-top: 0.67em; 122 | margin-bottom: 0.67em; } 123 | 124 | h2 { 125 | margin-top: 0.83em; 126 | margin-bottom: 0.83em; } 127 | 128 | h3 { 129 | margin-top: 1em; 130 | margin-bottom: 1em; } 131 | 132 | h4 { 133 | margin-top: 1.33em; 134 | margin-bottom: 1.33em; } 135 | 136 | h5 { 137 | margin-top: 1.67em; 138 | margin-bottom: 1.67em; } 139 | 140 | h6 { 141 | margin-top: 2.33em; 142 | margin-bottom: 2.33em; } 143 | 144 | h1, 145 | h2, 146 | h3, 147 | h4, 148 | h5, 149 | h6 { 150 | color: inherit; } 151 | 152 | p { 153 | font-size: inherit; 154 | line-height: inherit; 155 | margin-top: 28px; 156 | margin-bottom: 28px; } 157 | 158 | ul, 159 | ol { 160 | margin-bottom: 28px; 161 | padding-right: 1.3em; 162 | margin-right: 1.3em; } 163 | ul ul, 164 | ul ol, 165 | ol ul, 166 | ol ol { 167 | margin-bottom: 0; } 168 | ul li, 169 | ol li { 170 | margin-bottom: initial; } 171 | 172 | ul { 173 | list-style-type: disc; } 174 | 175 | ol { 176 | list-style-type: decimal; } 177 | 178 | ul ul, 179 | ol ul { 180 | list-style-type: circle; } 181 | 182 | .wp-align-wrapper { 183 | max-width: 580px; } 184 | .wp-align-wrapper > .wp-block, .wp-align-wrapper.wp-align-full { 185 | max-width: none; } 186 | .wp-align-wrapper.wp-align-wide { 187 | max-width: 1100px; } 188 | 189 | a { 190 | transition: none; } 191 | 192 | code, 193 | kbd { 194 | padding: 0; 195 | margin: 0; 196 | background: inherit; 197 | font-size: inherit; 198 | font-family: monospace; } 199 | -------------------------------------------------------------------------------- /public/vendor/gutenberg/styles/wp-editor/editor-styles-rtl.min.css: -------------------------------------------------------------------------------- 1 | :root{--wp-admin-theme-color:#007cba;--wp-admin-theme-color-darker-10:#006ba1;--wp-admin-theme-color-darker-20:#005a87}body{font-family:"Noto Serif",serif;font-size:16px;line-height:1.8;color:#1e1e1e;padding:10px}.block-editor-block-list__layout.is-root-container>.wp-block[data-align=full]{margin-right:-10px;margin-left:-10px}h1{font-size:2.44em}h2{font-size:1.95em}h3{font-size:1.56em}h4{font-size:1.25em}h5{font-size:1em}h6{font-size:.8em}h1,h2,h3{line-height:1.4}h4{line-height:1.5}h1{margin-top:.67em;margin-bottom:.67em}h2{margin-top:.83em;margin-bottom:.83em}h3{margin-top:1em;margin-bottom:1em}h4{margin-top:1.33em;margin-bottom:1.33em}h5{margin-top:1.67em;margin-bottom:1.67em}h6{margin-top:2.33em;margin-bottom:2.33em}h1,h2,h3,h4,h5,h6{color:inherit}p{font-size:inherit;line-height:inherit;margin-top:28px}ol,p,ul{margin-bottom:28px}ol,ul{padding-right:1.3em;margin-right:1.3em}ol li,ol ol,ol ul,ul li,ul ol,ul ul{margin-bottom:0}ul{list-style-type:disc}ol{list-style-type:decimal}ol ul,ul ul{list-style-type:circle}.wp-align-wrapper{max-width:580px}.wp-align-wrapper.wp-align-full,.wp-align-wrapper>.wp-block{max-width:none}.wp-align-wrapper.wp-align-wide{max-width:1100px}a{transition:none}code,kbd{padding:0;margin:0;background:inherit;font-size:inherit;font-family:monospace} -------------------------------------------------------------------------------- /public/vendor/gutenberg/styles/wp-editor/editor-styles.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Colors 3 | */ 4 | /** 5 | * Deprecated colors. 6 | * Please avoid using these. 7 | */ 8 | /** 9 | * Breakpoints & Media Queries 10 | */ 11 | /** 12 | * Colors 13 | */ 14 | /** 15 | * Deprecated colors. 16 | * Please avoid using these. 17 | */ 18 | /** 19 | * Fonts & basic variables. 20 | */ 21 | /** 22 | * Grid System. 23 | * https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/ 24 | */ 25 | /** 26 | * Dimensions. 27 | */ 28 | /** 29 | * Shadows. 30 | */ 31 | /** 32 | * Editor widths. 33 | */ 34 | /** 35 | * Block UI. 36 | */ 37 | /** 38 | * Border radii. 39 | */ 40 | /** 41 | * Breakpoint mixins 42 | */ 43 | /** 44 | * Long content fade mixin 45 | * 46 | * Creates a fading overlay to signify that the content is longer 47 | * than the space allows. 48 | */ 49 | /** 50 | * Focus styles. 51 | */ 52 | /** 53 | * Applies editor left position to the selector passed as argument 54 | */ 55 | /** 56 | * Styles that are reused verbatim in a few places 57 | */ 58 | /** 59 | * Allows users to opt-out of animations via OS-level preferences. 60 | */ 61 | /** 62 | * Reset default styles for JavaScript UI based pages. 63 | * This is a WP-admin agnostic reset 64 | */ 65 | /** 66 | * Reset the WP Admin page styles for Gutenberg-like pages. 67 | */ 68 | :root { 69 | --wp-admin-theme-color: #007cba; 70 | --wp-admin-theme-color-darker-10: #006ba1; 71 | --wp-admin-theme-color-darker-20: #005a87; } 72 | 73 | /** 74 | * Editor Normalization Styles 75 | * 76 | * These are only output in the editor, but styles here are prefixed .editor-styles-wrapper and affect the theming 77 | * of the editor by themes. 78 | * Why do these exist? Why not rely on browser defaults? 79 | * These styles are necessary so long as CSS can bleed from the wp-admin into the editing canvas itself. 80 | * Let's continue working to refactor these away, whether through Shadow DOM or better scoping of upstream styles. 81 | */ 82 | body { 83 | font-family: "Noto Serif", serif; 84 | font-size: 16px; 85 | line-height: 1.8; 86 | color: #1e1e1e; 87 | padding: 10px; } 88 | 89 | .block-editor-block-list__layout.is-root-container > .wp-block[data-align="full"] { 90 | margin-left: -10px; 91 | margin-right: -10px; } 92 | 93 | /* Headings */ 94 | h1 { 95 | font-size: 2.44em; } 96 | 97 | h2 { 98 | font-size: 1.95em; } 99 | 100 | h3 { 101 | font-size: 1.56em; } 102 | 103 | h4 { 104 | font-size: 1.25em; } 105 | 106 | h5 { 107 | font-size: 1em; } 108 | 109 | h6 { 110 | font-size: 0.8em; } 111 | 112 | h1, 113 | h2, 114 | h3 { 115 | line-height: 1.4; } 116 | 117 | h4 { 118 | line-height: 1.5; } 119 | 120 | h1 { 121 | margin-top: 0.67em; 122 | margin-bottom: 0.67em; } 123 | 124 | h2 { 125 | margin-top: 0.83em; 126 | margin-bottom: 0.83em; } 127 | 128 | h3 { 129 | margin-top: 1em; 130 | margin-bottom: 1em; } 131 | 132 | h4 { 133 | margin-top: 1.33em; 134 | margin-bottom: 1.33em; } 135 | 136 | h5 { 137 | margin-top: 1.67em; 138 | margin-bottom: 1.67em; } 139 | 140 | h6 { 141 | margin-top: 2.33em; 142 | margin-bottom: 2.33em; } 143 | 144 | h1, 145 | h2, 146 | h3, 147 | h4, 148 | h5, 149 | h6 { 150 | color: inherit; } 151 | 152 | p { 153 | font-size: inherit; 154 | line-height: inherit; 155 | margin-top: 28px; 156 | margin-bottom: 28px; } 157 | 158 | ul, 159 | ol { 160 | margin-bottom: 28px; 161 | padding-left: 1.3em; 162 | margin-left: 1.3em; } 163 | ul ul, 164 | ul ol, 165 | ol ul, 166 | ol ol { 167 | margin-bottom: 0; } 168 | ul li, 169 | ol li { 170 | margin-bottom: initial; } 171 | 172 | ul { 173 | list-style-type: disc; } 174 | 175 | ol { 176 | list-style-type: decimal; } 177 | 178 | ul ul, 179 | ol ul { 180 | list-style-type: circle; } 181 | 182 | .wp-align-wrapper { 183 | max-width: 580px; } 184 | .wp-align-wrapper > .wp-block, .wp-align-wrapper.wp-align-full { 185 | max-width: none; } 186 | .wp-align-wrapper.wp-align-wide { 187 | max-width: 1100px; } 188 | 189 | a { 190 | transition: none; } 191 | 192 | code, 193 | kbd { 194 | padding: 0; 195 | margin: 0; 196 | background: inherit; 197 | font-size: inherit; 198 | font-family: monospace; } 199 | -------------------------------------------------------------------------------- /public/vendor/gutenberg/styles/wp-editor/editor-styles.min.css: -------------------------------------------------------------------------------- 1 | :root{--wp-admin-theme-color:#007cba;--wp-admin-theme-color-darker-10:#006ba1;--wp-admin-theme-color-darker-20:#005a87}body{font-family:"Noto Serif",serif;font-size:16px;line-height:1.8;color:#1e1e1e;padding:10px}.block-editor-block-list__layout.is-root-container>.wp-block[data-align=full]{margin-left:-10px;margin-right:-10px}h1{font-size:2.44em}h2{font-size:1.95em}h3{font-size:1.56em}h4{font-size:1.25em}h5{font-size:1em}h6{font-size:.8em}h1,h2,h3{line-height:1.4}h4{line-height:1.5}h1{margin-top:.67em;margin-bottom:.67em}h2{margin-top:.83em;margin-bottom:.83em}h3{margin-top:1em;margin-bottom:1em}h4{margin-top:1.33em;margin-bottom:1.33em}h5{margin-top:1.67em;margin-bottom:1.67em}h6{margin-top:2.33em;margin-bottom:2.33em}h1,h2,h3,h4,h5,h6{color:inherit}p{font-size:inherit;line-height:inherit;margin-top:28px}ol,p,ul{margin-bottom:28px}ol,ul{padding-left:1.3em;margin-left:1.3em}ol li,ol ol,ol ul,ul li,ul ol,ul ul{margin-bottom:0}ul{list-style-type:disc}ol{list-style-type:decimal}ol ul,ul ul{list-style-type:circle}.wp-align-wrapper{max-width:580px}.wp-align-wrapper.wp-align-full,.wp-align-wrapper>.wp-block{max-width:none}.wp-align-wrapper.wp-align-wide{max-width:1100px}a{transition:none}code,kbd{padding:0;margin:0;background:inherit;font-size:inherit;font-family:monospace} -------------------------------------------------------------------------------- /public/vendor/gutenberg/styles/wp-format-library/style-rtl.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Colors 3 | */ 4 | /** 5 | * Deprecated colors. 6 | * Please avoid using these. 7 | */ 8 | /** 9 | * Breakpoints & Media Queries 10 | */ 11 | /** 12 | * Colors 13 | */ 14 | /** 15 | * Deprecated colors. 16 | * Please avoid using these. 17 | */ 18 | /** 19 | * Fonts & basic variables. 20 | */ 21 | /** 22 | * Grid System. 23 | * https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/ 24 | */ 25 | /** 26 | * Dimensions. 27 | */ 28 | /** 29 | * Shadows. 30 | */ 31 | /** 32 | * Editor widths. 33 | */ 34 | /** 35 | * Block UI. 36 | */ 37 | /** 38 | * Border radii. 39 | */ 40 | /** 41 | * Breakpoint mixins 42 | */ 43 | /** 44 | * Long content fade mixin 45 | * 46 | * Creates a fading overlay to signify that the content is longer 47 | * than the space allows. 48 | */ 49 | /** 50 | * Focus styles. 51 | */ 52 | /** 53 | * Applies editor left position to the selector passed as argument 54 | */ 55 | /** 56 | * Styles that are reused verbatim in a few places 57 | */ 58 | /** 59 | * Allows users to opt-out of animations via OS-level preferences. 60 | */ 61 | /** 62 | * Reset default styles for JavaScript UI based pages. 63 | * This is a WP-admin agnostic reset 64 | */ 65 | /** 66 | * Reset the WP Admin page styles for Gutenberg-like pages. 67 | */ 68 | :root { 69 | --wp-admin-theme-color: #007cba; 70 | --wp-admin-theme-color-darker-10: #006ba1; 71 | --wp-admin-theme-color-darker-20: #005a87; } 72 | 73 | .block-editor-format-toolbar__image-container-content { 74 | display: flex; } 75 | .block-editor-format-toolbar__image-container-content .components-button { 76 | align-self: flex-end; 77 | height: 30px; 78 | margin-bottom: 8px; 79 | margin-left: 8px; 80 | padding: 0 6px; } 81 | 82 | .block-editor-format-toolbar__image-container-value { 83 | margin: 7px; 84 | flex-grow: 1; 85 | flex-shrink: 1; 86 | white-space: nowrap; 87 | min-width: 150px; 88 | max-width: 500px; } 89 | .block-editor-format-toolbar__image-container-value.components-base-control .components-base-control__field { 90 | margin-bottom: 0; } 91 | .block-editor-format-toolbar__image-container-value.components-base-control .components-base-control__label { 92 | display: block; } 93 | 94 | .block-editor-format-toolbar__link-container-content { 95 | display: flex; } 96 | 97 | .block-editor-format-toolbar__link-container-value { 98 | margin: 7px; 99 | flex-grow: 1; 100 | flex-shrink: 1; 101 | overflow: hidden; 102 | text-overflow: ellipsis; 103 | white-space: nowrap; 104 | min-width: 150px; 105 | max-width: 500px; } 106 | .block-editor-format-toolbar__link-container-value.has-invalid-link { 107 | color: #d94f4f; } 108 | 109 | .components-inline-color__indicator { 110 | position: absolute; 111 | background: #000; 112 | height: 3px; 113 | width: 20px; 114 | bottom: 6px; 115 | right: auto; 116 | left: auto; 117 | margin: 0 5px; } 118 | 119 | .components-inline-color-popover .components-popover__content > div { 120 | padding: 20px 18px; } 121 | 122 | .components-inline-color-popover .components-popover__content .components-color-palette { 123 | margin-top: 0.6rem; } 124 | 125 | .components-inline-color-popover .components-popover__content .components-base-control__title { 126 | display: block; 127 | margin-bottom: 16px; 128 | font-weight: 600; 129 | color: #191e23; } 130 | 131 | .components-inline-color-popover .components-popover__content .component-color-indicator { 132 | vertical-align: text-bottom; } 133 | 134 | .format-library-text-color-button { 135 | position: relative; } 136 | 137 | .format-library-text-color-button__indicator { 138 | height: 4px; 139 | width: 20px; 140 | position: absolute; 141 | bottom: 10px; 142 | right: 8px; } 143 | -------------------------------------------------------------------------------- /public/vendor/gutenberg/styles/wp-format-library/style-rtl.min.css: -------------------------------------------------------------------------------- 1 | :root{--wp-admin-theme-color:#007cba;--wp-admin-theme-color-darker-10:#006ba1;--wp-admin-theme-color-darker-20:#005a87}.block-editor-format-toolbar__image-container-content{display:flex}.block-editor-format-toolbar__image-container-content .components-button{align-self:flex-end;height:30px;margin-bottom:8px;margin-left:8px;padding:0 6px}.block-editor-format-toolbar__image-container-value{margin:7px;flex-grow:1;flex-shrink:1;white-space:nowrap;min-width:150px;max-width:500px}.block-editor-format-toolbar__image-container-value.components-base-control .components-base-control__field{margin-bottom:0}.block-editor-format-toolbar__image-container-value.components-base-control .components-base-control__label{display:block}.block-editor-format-toolbar__link-container-content{display:flex}.block-editor-format-toolbar__link-container-value{margin:7px;flex-grow:1;flex-shrink:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:150px;max-width:500px}.block-editor-format-toolbar__link-container-value.has-invalid-link{color:#d94f4f}.components-inline-color__indicator{position:absolute;background:#000;height:3px;width:20px;bottom:6px;right:auto;left:auto;margin:0 5px}.components-inline-color-popover .components-popover__content>div{padding:20px 18px}.components-inline-color-popover .components-popover__content .components-color-palette{margin-top:.6rem}.components-inline-color-popover .components-popover__content .components-base-control__title{display:block;margin-bottom:16px;font-weight:600;color:#191e23}.components-inline-color-popover .components-popover__content .component-color-indicator{vertical-align:text-bottom}.format-library-text-color-button{position:relative}.format-library-text-color-button__indicator{height:4px;width:20px;position:absolute;bottom:10px;right:8px} -------------------------------------------------------------------------------- /public/vendor/gutenberg/styles/wp-format-library/style.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Colors 3 | */ 4 | /** 5 | * Deprecated colors. 6 | * Please avoid using these. 7 | */ 8 | /** 9 | * Breakpoints & Media Queries 10 | */ 11 | /** 12 | * Colors 13 | */ 14 | /** 15 | * Deprecated colors. 16 | * Please avoid using these. 17 | */ 18 | /** 19 | * Fonts & basic variables. 20 | */ 21 | /** 22 | * Grid System. 23 | * https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/ 24 | */ 25 | /** 26 | * Dimensions. 27 | */ 28 | /** 29 | * Shadows. 30 | */ 31 | /** 32 | * Editor widths. 33 | */ 34 | /** 35 | * Block UI. 36 | */ 37 | /** 38 | * Border radii. 39 | */ 40 | /** 41 | * Breakpoint mixins 42 | */ 43 | /** 44 | * Long content fade mixin 45 | * 46 | * Creates a fading overlay to signify that the content is longer 47 | * than the space allows. 48 | */ 49 | /** 50 | * Focus styles. 51 | */ 52 | /** 53 | * Applies editor left position to the selector passed as argument 54 | */ 55 | /** 56 | * Styles that are reused verbatim in a few places 57 | */ 58 | /** 59 | * Allows users to opt-out of animations via OS-level preferences. 60 | */ 61 | /** 62 | * Reset default styles for JavaScript UI based pages. 63 | * This is a WP-admin agnostic reset 64 | */ 65 | /** 66 | * Reset the WP Admin page styles for Gutenberg-like pages. 67 | */ 68 | :root { 69 | --wp-admin-theme-color: #007cba; 70 | --wp-admin-theme-color-darker-10: #006ba1; 71 | --wp-admin-theme-color-darker-20: #005a87; } 72 | 73 | .block-editor-format-toolbar__image-container-content { 74 | display: flex; } 75 | .block-editor-format-toolbar__image-container-content .components-button { 76 | align-self: flex-end; 77 | height: 30px; 78 | margin-bottom: 8px; 79 | margin-right: 8px; 80 | padding: 0 6px; } 81 | 82 | .block-editor-format-toolbar__image-container-value { 83 | margin: 7px; 84 | flex-grow: 1; 85 | flex-shrink: 1; 86 | white-space: nowrap; 87 | min-width: 150px; 88 | max-width: 500px; } 89 | .block-editor-format-toolbar__image-container-value.components-base-control .components-base-control__field { 90 | margin-bottom: 0; } 91 | .block-editor-format-toolbar__image-container-value.components-base-control .components-base-control__label { 92 | display: block; } 93 | 94 | .block-editor-format-toolbar__link-container-content { 95 | display: flex; } 96 | 97 | .block-editor-format-toolbar__link-container-value { 98 | margin: 7px; 99 | flex-grow: 1; 100 | flex-shrink: 1; 101 | overflow: hidden; 102 | text-overflow: ellipsis; 103 | white-space: nowrap; 104 | min-width: 150px; 105 | max-width: 500px; } 106 | .block-editor-format-toolbar__link-container-value.has-invalid-link { 107 | color: #d94f4f; } 108 | 109 | .components-inline-color__indicator { 110 | position: absolute; 111 | background: #000; 112 | height: 3px; 113 | width: 20px; 114 | bottom: 6px; 115 | left: auto; 116 | right: auto; 117 | margin: 0 5px; } 118 | 119 | .components-inline-color-popover .components-popover__content > div { 120 | padding: 20px 18px; } 121 | 122 | .components-inline-color-popover .components-popover__content .components-color-palette { 123 | margin-top: 0.6rem; } 124 | 125 | .components-inline-color-popover .components-popover__content .components-base-control__title { 126 | display: block; 127 | margin-bottom: 16px; 128 | font-weight: 600; 129 | color: #191e23; } 130 | 131 | .components-inline-color-popover .components-popover__content .component-color-indicator { 132 | vertical-align: text-bottom; } 133 | 134 | .format-library-text-color-button { 135 | position: relative; } 136 | 137 | .format-library-text-color-button__indicator { 138 | height: 4px; 139 | width: 20px; 140 | position: absolute; 141 | bottom: 10px; 142 | left: 8px; } 143 | -------------------------------------------------------------------------------- /public/vendor/gutenberg/styles/wp-format-library/style.min.css: -------------------------------------------------------------------------------- 1 | :root{--wp-admin-theme-color:#007cba;--wp-admin-theme-color-darker-10:#006ba1;--wp-admin-theme-color-darker-20:#005a87}.block-editor-format-toolbar__image-container-content{display:flex}.block-editor-format-toolbar__image-container-content .components-button{align-self:flex-end;height:30px;margin-bottom:8px;margin-right:8px;padding:0 6px}.block-editor-format-toolbar__image-container-value{margin:7px;flex-grow:1;flex-shrink:1;white-space:nowrap;min-width:150px;max-width:500px}.block-editor-format-toolbar__image-container-value.components-base-control .components-base-control__field{margin-bottom:0}.block-editor-format-toolbar__image-container-value.components-base-control .components-base-control__label{display:block}.block-editor-format-toolbar__link-container-content{display:flex}.block-editor-format-toolbar__link-container-value{margin:7px;flex-grow:1;flex-shrink:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:150px;max-width:500px}.block-editor-format-toolbar__link-container-value.has-invalid-link{color:#d94f4f}.components-inline-color__indicator{position:absolute;background:#000;height:3px;width:20px;bottom:6px;left:auto;right:auto;margin:0 5px}.components-inline-color-popover .components-popover__content>div{padding:20px 18px}.components-inline-color-popover .components-popover__content .components-color-palette{margin-top:.6rem}.components-inline-color-popover .components-popover__content .components-base-control__title{display:block;margin-bottom:16px;font-weight:600;color:#191e23}.components-inline-color-popover .components-popover__content .component-color-indicator{vertical-align:text-bottom}.format-library-text-color-button{position:relative}.format-library-text-color-button__indicator{height:4px;width:20px;position:absolute;bottom:10px;left:8px} -------------------------------------------------------------------------------- /public/vendor/gutenberg/styles/wp-list-reusable-blocks/style-rtl.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Colors 3 | */ 4 | /** 5 | * Deprecated colors. 6 | * Please avoid using these. 7 | */ 8 | /** 9 | * Breakpoints & Media Queries 10 | */ 11 | /** 12 | * Colors 13 | */ 14 | /** 15 | * Deprecated colors. 16 | * Please avoid using these. 17 | */ 18 | /** 19 | * Fonts & basic variables. 20 | */ 21 | /** 22 | * Grid System. 23 | * https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/ 24 | */ 25 | /** 26 | * Dimensions. 27 | */ 28 | /** 29 | * Shadows. 30 | */ 31 | /** 32 | * Editor widths. 33 | */ 34 | /** 35 | * Block UI. 36 | */ 37 | /** 38 | * Border radii. 39 | */ 40 | /** 41 | * Breakpoint mixins 42 | */ 43 | /** 44 | * Long content fade mixin 45 | * 46 | * Creates a fading overlay to signify that the content is longer 47 | * than the space allows. 48 | */ 49 | /** 50 | * Focus styles. 51 | */ 52 | /** 53 | * Applies editor left position to the selector passed as argument 54 | */ 55 | /** 56 | * Styles that are reused verbatim in a few places 57 | */ 58 | /** 59 | * Allows users to opt-out of animations via OS-level preferences. 60 | */ 61 | /** 62 | * Reset default styles for JavaScript UI based pages. 63 | * This is a WP-admin agnostic reset 64 | */ 65 | /** 66 | * Reset the WP Admin page styles for Gutenberg-like pages. 67 | */ 68 | :root { 69 | --wp-admin-theme-color: #007cba; 70 | --wp-admin-theme-color-darker-10: #006ba1; 71 | --wp-admin-theme-color-darker-20: #005a87; } 72 | 73 | .list-reusable-blocks-import-dropdown__content .components-popover__content > div { 74 | padding: 10px; } 75 | 76 | .list-reusable-blocks-import-form__label { 77 | display: block; 78 | margin-bottom: 10px; } 79 | 80 | .list-reusable-blocks-import-form__button { 81 | margin-top: 20px; 82 | float: left; } 83 | 84 | .list-reusable-blocks-import-form .components-notice__content { 85 | margin: 0; } 86 | 87 | .list-reusable-blocks__container { 88 | display: inline-flex; 89 | align-items: center; 90 | position: relative; 91 | top: -3px; } 92 | .list-reusable-blocks__container .components-button { 93 | height: 26px; } 94 | 95 | body.admin-color-light { 96 | --wp-admin-theme-color: #0085ba; 97 | --wp-admin-theme-color-darker-10: #0073a1; 98 | --wp-admin-theme-color-darker-20: #006187; } 99 | 100 | body.admin-color-modern { 101 | --wp-admin-theme-color: #3858e9; 102 | --wp-admin-theme-color-darker-10: #2145e6; 103 | --wp-admin-theme-color-darker-20: #183ad6; } 104 | 105 | body.admin-color-blue { 106 | --wp-admin-theme-color: #096484; 107 | --wp-admin-theme-color-darker-10: #07526c; 108 | --wp-admin-theme-color-darker-20: #064054; } 109 | 110 | body.admin-color-coffee { 111 | --wp-admin-theme-color: #46403c; 112 | --wp-admin-theme-color-darker-10: #383330; 113 | --wp-admin-theme-color-darker-20: #2b2724; } 114 | 115 | body.admin-color-ectoplasm { 116 | --wp-admin-theme-color: #523f6d; 117 | --wp-admin-theme-color-darker-10: #46365d; 118 | --wp-admin-theme-color-darker-20: #3a2c4d; } 119 | 120 | body.admin-color-midnight { 121 | --wp-admin-theme-color: #e14d43; 122 | --wp-admin-theme-color-darker-10: #dd382d; 123 | --wp-admin-theme-color-darker-20: #d02c21; } 124 | 125 | body.admin-color-ocean { 126 | --wp-admin-theme-color: #627c83; 127 | --wp-admin-theme-color-darker-10: #576e74; 128 | --wp-admin-theme-color-darker-20: #4c6066; } 129 | 130 | body.admin-color-sunrise { 131 | --wp-admin-theme-color: #dd823b; 132 | --wp-admin-theme-color-darker-10: #d97426; 133 | --wp-admin-theme-color-darker-20: #c36922; } 134 | -------------------------------------------------------------------------------- /public/vendor/gutenberg/styles/wp-list-reusable-blocks/style-rtl.min.css: -------------------------------------------------------------------------------- 1 | :root{--wp-admin-theme-color:#007cba;--wp-admin-theme-color-darker-10:#006ba1;--wp-admin-theme-color-darker-20:#005a87}.list-reusable-blocks-import-dropdown__content .components-popover__content>div{padding:10px}.list-reusable-blocks-import-form__label{display:block;margin-bottom:10px}.list-reusable-blocks-import-form__button{margin-top:20px;float:left}.list-reusable-blocks-import-form .components-notice__content{margin:0}.list-reusable-blocks__container{display:inline-flex;align-items:center;position:relative;top:-3px}.list-reusable-blocks__container .components-button{height:26px}body.admin-color-light{--wp-admin-theme-color:#0085ba;--wp-admin-theme-color-darker-10:#0073a1;--wp-admin-theme-color-darker-20:#006187}body.admin-color-modern{--wp-admin-theme-color:#3858e9;--wp-admin-theme-color-darker-10:#2145e6;--wp-admin-theme-color-darker-20:#183ad6}body.admin-color-blue{--wp-admin-theme-color:#096484;--wp-admin-theme-color-darker-10:#07526c;--wp-admin-theme-color-darker-20:#064054}body.admin-color-coffee{--wp-admin-theme-color:#46403c;--wp-admin-theme-color-darker-10:#383330;--wp-admin-theme-color-darker-20:#2b2724}body.admin-color-ectoplasm{--wp-admin-theme-color:#523f6d;--wp-admin-theme-color-darker-10:#46365d;--wp-admin-theme-color-darker-20:#3a2c4d}body.admin-color-midnight{--wp-admin-theme-color:#e14d43;--wp-admin-theme-color-darker-10:#dd382d;--wp-admin-theme-color-darker-20:#d02c21}body.admin-color-ocean{--wp-admin-theme-color:#627c83;--wp-admin-theme-color-darker-10:#576e74;--wp-admin-theme-color-darker-20:#4c6066}body.admin-color-sunrise{--wp-admin-theme-color:#dd823b;--wp-admin-theme-color-darker-10:#d97426;--wp-admin-theme-color-darker-20:#c36922} -------------------------------------------------------------------------------- /public/vendor/gutenberg/styles/wp-list-reusable-blocks/style.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Colors 3 | */ 4 | /** 5 | * Deprecated colors. 6 | * Please avoid using these. 7 | */ 8 | /** 9 | * Breakpoints & Media Queries 10 | */ 11 | /** 12 | * Colors 13 | */ 14 | /** 15 | * Deprecated colors. 16 | * Please avoid using these. 17 | */ 18 | /** 19 | * Fonts & basic variables. 20 | */ 21 | /** 22 | * Grid System. 23 | * https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/ 24 | */ 25 | /** 26 | * Dimensions. 27 | */ 28 | /** 29 | * Shadows. 30 | */ 31 | /** 32 | * Editor widths. 33 | */ 34 | /** 35 | * Block UI. 36 | */ 37 | /** 38 | * Border radii. 39 | */ 40 | /** 41 | * Breakpoint mixins 42 | */ 43 | /** 44 | * Long content fade mixin 45 | * 46 | * Creates a fading overlay to signify that the content is longer 47 | * than the space allows. 48 | */ 49 | /** 50 | * Focus styles. 51 | */ 52 | /** 53 | * Applies editor left position to the selector passed as argument 54 | */ 55 | /** 56 | * Styles that are reused verbatim in a few places 57 | */ 58 | /** 59 | * Allows users to opt-out of animations via OS-level preferences. 60 | */ 61 | /** 62 | * Reset default styles for JavaScript UI based pages. 63 | * This is a WP-admin agnostic reset 64 | */ 65 | /** 66 | * Reset the WP Admin page styles for Gutenberg-like pages. 67 | */ 68 | :root { 69 | --wp-admin-theme-color: #007cba; 70 | --wp-admin-theme-color-darker-10: #006ba1; 71 | --wp-admin-theme-color-darker-20: #005a87; } 72 | 73 | .list-reusable-blocks-import-dropdown__content .components-popover__content > div { 74 | padding: 10px; } 75 | 76 | .list-reusable-blocks-import-form__label { 77 | display: block; 78 | margin-bottom: 10px; } 79 | 80 | .list-reusable-blocks-import-form__button { 81 | margin-top: 20px; 82 | float: right; } 83 | 84 | .list-reusable-blocks-import-form .components-notice__content { 85 | margin: 0; } 86 | 87 | .list-reusable-blocks__container { 88 | display: inline-flex; 89 | align-items: center; 90 | position: relative; 91 | top: -3px; } 92 | .list-reusable-blocks__container .components-button { 93 | height: 26px; } 94 | 95 | body.admin-color-light { 96 | --wp-admin-theme-color: #0085ba; 97 | --wp-admin-theme-color-darker-10: #0073a1; 98 | --wp-admin-theme-color-darker-20: #006187; } 99 | 100 | body.admin-color-modern { 101 | --wp-admin-theme-color: #3858e9; 102 | --wp-admin-theme-color-darker-10: #2145e6; 103 | --wp-admin-theme-color-darker-20: #183ad6; } 104 | 105 | body.admin-color-blue { 106 | --wp-admin-theme-color: #096484; 107 | --wp-admin-theme-color-darker-10: #07526c; 108 | --wp-admin-theme-color-darker-20: #064054; } 109 | 110 | body.admin-color-coffee { 111 | --wp-admin-theme-color: #46403c; 112 | --wp-admin-theme-color-darker-10: #383330; 113 | --wp-admin-theme-color-darker-20: #2b2724; } 114 | 115 | body.admin-color-ectoplasm { 116 | --wp-admin-theme-color: #523f6d; 117 | --wp-admin-theme-color-darker-10: #46365d; 118 | --wp-admin-theme-color-darker-20: #3a2c4d; } 119 | 120 | body.admin-color-midnight { 121 | --wp-admin-theme-color: #e14d43; 122 | --wp-admin-theme-color-darker-10: #dd382d; 123 | --wp-admin-theme-color-darker-20: #d02c21; } 124 | 125 | body.admin-color-ocean { 126 | --wp-admin-theme-color: #627c83; 127 | --wp-admin-theme-color-darker-10: #576e74; 128 | --wp-admin-theme-color-darker-20: #4c6066; } 129 | 130 | body.admin-color-sunrise { 131 | --wp-admin-theme-color: #dd823b; 132 | --wp-admin-theme-color-darker-10: #d97426; 133 | --wp-admin-theme-color-darker-20: #c36922; } 134 | -------------------------------------------------------------------------------- /public/vendor/gutenberg/styles/wp-list-reusable-blocks/style.min.css: -------------------------------------------------------------------------------- 1 | :root{--wp-admin-theme-color:#007cba;--wp-admin-theme-color-darker-10:#006ba1;--wp-admin-theme-color-darker-20:#005a87}.list-reusable-blocks-import-dropdown__content .components-popover__content>div{padding:10px}.list-reusable-blocks-import-form__label{display:block;margin-bottom:10px}.list-reusable-blocks-import-form__button{margin-top:20px;float:right}.list-reusable-blocks-import-form .components-notice__content{margin:0}.list-reusable-blocks__container{display:inline-flex;align-items:center;position:relative;top:-3px}.list-reusable-blocks__container .components-button{height:26px}body.admin-color-light{--wp-admin-theme-color:#0085ba;--wp-admin-theme-color-darker-10:#0073a1;--wp-admin-theme-color-darker-20:#006187}body.admin-color-modern{--wp-admin-theme-color:#3858e9;--wp-admin-theme-color-darker-10:#2145e6;--wp-admin-theme-color-darker-20:#183ad6}body.admin-color-blue{--wp-admin-theme-color:#096484;--wp-admin-theme-color-darker-10:#07526c;--wp-admin-theme-color-darker-20:#064054}body.admin-color-coffee{--wp-admin-theme-color:#46403c;--wp-admin-theme-color-darker-10:#383330;--wp-admin-theme-color-darker-20:#2b2724}body.admin-color-ectoplasm{--wp-admin-theme-color:#523f6d;--wp-admin-theme-color-darker-10:#46365d;--wp-admin-theme-color-darker-20:#3a2c4d}body.admin-color-midnight{--wp-admin-theme-color:#e14d43;--wp-admin-theme-color-darker-10:#dd382d;--wp-admin-theme-color-darker-20:#d02c21}body.admin-color-ocean{--wp-admin-theme-color:#627c83;--wp-admin-theme-color-darker-10:#576e74;--wp-admin-theme-color-darker-20:#4c6066}body.admin-color-sunrise{--wp-admin-theme-color:#dd823b;--wp-admin-theme-color-darker-10:#d97426;--wp-admin-theme-color-darker-20:#c36922} -------------------------------------------------------------------------------- /public/vendor/gutenberg/styles/wp-nux/style-rtl.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Colors 3 | */ 4 | /** 5 | * Deprecated colors. 6 | * Please avoid using these. 7 | */ 8 | /** 9 | * Breakpoints & Media Queries 10 | */ 11 | /** 12 | * Colors 13 | */ 14 | /** 15 | * Deprecated colors. 16 | * Please avoid using these. 17 | */ 18 | /** 19 | * Fonts & basic variables. 20 | */ 21 | /** 22 | * Grid System. 23 | * https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/ 24 | */ 25 | /** 26 | * Dimensions. 27 | */ 28 | /** 29 | * Shadows. 30 | */ 31 | /** 32 | * Editor widths. 33 | */ 34 | /** 35 | * Block UI. 36 | */ 37 | /** 38 | * Border radii. 39 | */ 40 | /** 41 | * Breakpoint mixins 42 | */ 43 | /** 44 | * Long content fade mixin 45 | * 46 | * Creates a fading overlay to signify that the content is longer 47 | * than the space allows. 48 | */ 49 | /** 50 | * Focus styles. 51 | */ 52 | /** 53 | * Applies editor left position to the selector passed as argument 54 | */ 55 | /** 56 | * Styles that are reused verbatim in a few places 57 | */ 58 | /** 59 | * Allows users to opt-out of animations via OS-level preferences. 60 | */ 61 | /** 62 | * Reset default styles for JavaScript UI based pages. 63 | * This is a WP-admin agnostic reset 64 | */ 65 | /** 66 | * Reset the WP Admin page styles for Gutenberg-like pages. 67 | */ 68 | :root { 69 | --wp-admin-theme-color: #007cba; 70 | --wp-admin-theme-color-darker-10: #006ba1; 71 | --wp-admin-theme-color-darker-20: #005a87; } 72 | 73 | .nux-dot-tip::before, .nux-dot-tip::after { 74 | border-radius: 100%; 75 | content: " "; 76 | pointer-events: none; 77 | position: absolute; } 78 | 79 | .nux-dot-tip::before { 80 | animation: nux-pulse 1.6s infinite cubic-bezier(0.17, 0.67, 0.92, 0.62); 81 | background: rgba(0, 115, 156, 0.9); 82 | opacity: 0.9; 83 | height: 24px; 84 | right: -12px; 85 | top: -12px; 86 | transform: scale(0.33333); 87 | width: 24px; } 88 | 89 | .nux-dot-tip::after { 90 | background: #00739c; 91 | height: 8px; 92 | right: -4px; 93 | top: -4px; 94 | width: 8px; } 95 | 96 | @keyframes nux-pulse { 97 | 100% { 98 | background: rgba(0, 115, 156, 0); 99 | transform: scale(1); } } 100 | 101 | .nux-dot-tip .components-popover__content { 102 | width: 350px; } 103 | .nux-dot-tip .components-popover__content > div { 104 | padding: 20px 18px; } 105 | @media (min-width: 600px) { 106 | .nux-dot-tip .components-popover__content { 107 | width: 450px; } } 108 | .nux-dot-tip .components-popover__content .nux-dot-tip__disable { 109 | position: absolute; 110 | left: 0; 111 | top: 0; } 112 | 113 | .nux-dot-tip[data-y-axis="top"] { 114 | margin-top: -4px; } 115 | 116 | .nux-dot-tip[data-y-axis="bottom"] { 117 | margin-top: 4px; } 118 | 119 | .nux-dot-tip[data-y-axis="middle"][data-y-axis="left"] { 120 | margin-right: -4px; } 121 | 122 | .nux-dot-tip[data-y-axis="middle"][data-y-axis="right"] { 123 | margin-right: 4px; } 124 | 125 | .nux-dot-tip[data-y-axis="top"] .components-popover__content { 126 | margin-bottom: 20px; } 127 | 128 | .nux-dot-tip[data-y-axis="bottom"] .components-popover__content { 129 | margin-top: 20px; } 130 | 131 | .nux-dot-tip[data-y-axis="middle"][data-y-axis="left"] .components-popover__content { 132 | margin-left: 20px; } 133 | 134 | .nux-dot-tip[data-y-axis="middle"][data-y-axis="right"] .components-popover__content { 135 | margin-right: 20px; } 136 | 137 | .nux-dot-tip[data-y-axis="left"], .nux-dot-tip[data-y-axis="center"], .nux-dot-tip[data-y-axis="right"] { 138 | z-index: 1000001; } 139 | @media (max-width: 600px) { 140 | .nux-dot-tip[data-y-axis="left"] .components-popover__content, .nux-dot-tip[data-y-axis="center"] .components-popover__content, .nux-dot-tip[data-y-axis="right"] .components-popover__content { 141 | -ms-grid-row-align: end; 142 | align-self: end; 143 | right: 5px; 144 | margin: 20px 0 0 0; 145 | max-width: none !important; 146 | position: fixed; 147 | left: 5px; 148 | width: auto; } } 149 | 150 | .nux-dot-tip.components-popover:not([data-y-axis="middle"])[data-y-axis="right"] .components-popover__content { 151 | margin-left: 0; } 152 | 153 | .nux-dot-tip.components-popover:not([data-y-axis="middle"])[data-y-axis="left"] .components-popover__content { 154 | margin-right: 0; } 155 | 156 | .nux-dot-tip.components-popover.edit-post-more-menu__content:not([data-y-axis="middle"])[data-y-axis="right"] .components-popover__content { 157 | margin-left: -12px; } 158 | 159 | .nux-dot-tip.components-popover.edit-post-more-menu__content:not([data-y-axis="middle"])[data-y-axis="left"] .components-popover__content { 160 | margin-right: -12px; } 161 | -------------------------------------------------------------------------------- /public/vendor/gutenberg/styles/wp-nux/style-rtl.min.css: -------------------------------------------------------------------------------- 1 | :root{--wp-admin-theme-color:#007cba;--wp-admin-theme-color-darker-10:#006ba1;--wp-admin-theme-color-darker-20:#005a87}.nux-dot-tip:after,.nux-dot-tip:before{border-radius:100%;content:" ";pointer-events:none;position:absolute}.nux-dot-tip:before{animation:nux-pulse 1.6s cubic-bezier(.17,.67,.92,.62) infinite;background:rgba(0,115,156,.9);opacity:.9;height:24px;right:-12px;top:-12px;transform:scale(.33333);width:24px}.nux-dot-tip:after{background:#00739c;height:8px;right:-4px;top:-4px;width:8px}@keyframes nux-pulse{to{background:rgba(0,115,156,0);transform:scale(1)}}.nux-dot-tip .components-popover__content{width:350px}.nux-dot-tip .components-popover__content>div{padding:20px 18px}@media (min-width:600px){.nux-dot-tip .components-popover__content{width:450px}}.nux-dot-tip .components-popover__content .nux-dot-tip__disable{position:absolute;left:0;top:0}.nux-dot-tip[data-y-axis=top]{margin-top:-4px}.nux-dot-tip[data-y-axis=bottom]{margin-top:4px}.nux-dot-tip[data-y-axis=middle][data-y-axis=left]{margin-right:-4px}.nux-dot-tip[data-y-axis=middle][data-y-axis=right]{margin-right:4px}.nux-dot-tip[data-y-axis=top] .components-popover__content{margin-bottom:20px}.nux-dot-tip[data-y-axis=bottom] .components-popover__content{margin-top:20px}.nux-dot-tip[data-y-axis=middle][data-y-axis=left] .components-popover__content{margin-left:20px}.nux-dot-tip[data-y-axis=middle][data-y-axis=right] .components-popover__content{margin-right:20px}.nux-dot-tip[data-y-axis=center],.nux-dot-tip[data-y-axis=left],.nux-dot-tip[data-y-axis=right]{z-index:1000001}@media (max-width:600px){.nux-dot-tip[data-y-axis=center] .components-popover__content,.nux-dot-tip[data-y-axis=left] .components-popover__content,.nux-dot-tip[data-y-axis=right] .components-popover__content{-ms-grid-row-align:end;align-self:end;right:5px;margin:20px 0 0;max-width:none!important;position:fixed;left:5px;width:auto}}.nux-dot-tip.components-popover:not([data-y-axis=middle])[data-y-axis=right] .components-popover__content{margin-left:0}.nux-dot-tip.components-popover:not([data-y-axis=middle])[data-y-axis=left] .components-popover__content{margin-right:0}.nux-dot-tip.components-popover.edit-post-more-menu__content:not([data-y-axis=middle])[data-y-axis=right] .components-popover__content{margin-left:-12px}.nux-dot-tip.components-popover.edit-post-more-menu__content:not([data-y-axis=middle])[data-y-axis=left] .components-popover__content{margin-right:-12px} -------------------------------------------------------------------------------- /public/vendor/gutenberg/styles/wp-nux/style.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Colors 3 | */ 4 | /** 5 | * Deprecated colors. 6 | * Please avoid using these. 7 | */ 8 | /** 9 | * Breakpoints & Media Queries 10 | */ 11 | /** 12 | * Colors 13 | */ 14 | /** 15 | * Deprecated colors. 16 | * Please avoid using these. 17 | */ 18 | /** 19 | * Fonts & basic variables. 20 | */ 21 | /** 22 | * Grid System. 23 | * https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/ 24 | */ 25 | /** 26 | * Dimensions. 27 | */ 28 | /** 29 | * Shadows. 30 | */ 31 | /** 32 | * Editor widths. 33 | */ 34 | /** 35 | * Block UI. 36 | */ 37 | /** 38 | * Border radii. 39 | */ 40 | /** 41 | * Breakpoint mixins 42 | */ 43 | /** 44 | * Long content fade mixin 45 | * 46 | * Creates a fading overlay to signify that the content is longer 47 | * than the space allows. 48 | */ 49 | /** 50 | * Focus styles. 51 | */ 52 | /** 53 | * Applies editor left position to the selector passed as argument 54 | */ 55 | /** 56 | * Styles that are reused verbatim in a few places 57 | */ 58 | /** 59 | * Allows users to opt-out of animations via OS-level preferences. 60 | */ 61 | /** 62 | * Reset default styles for JavaScript UI based pages. 63 | * This is a WP-admin agnostic reset 64 | */ 65 | /** 66 | * Reset the WP Admin page styles for Gutenberg-like pages. 67 | */ 68 | :root { 69 | --wp-admin-theme-color: #007cba; 70 | --wp-admin-theme-color-darker-10: #006ba1; 71 | --wp-admin-theme-color-darker-20: #005a87; } 72 | 73 | .nux-dot-tip::before, .nux-dot-tip::after { 74 | border-radius: 100%; 75 | content: " "; 76 | pointer-events: none; 77 | position: absolute; } 78 | 79 | .nux-dot-tip::before { 80 | animation: nux-pulse 1.6s infinite cubic-bezier(0.17, 0.67, 0.92, 0.62); 81 | background: rgba(0, 115, 156, 0.9); 82 | opacity: 0.9; 83 | height: 24px; 84 | left: -12px; 85 | top: -12px; 86 | transform: scale(0.33333); 87 | width: 24px; } 88 | 89 | .nux-dot-tip::after { 90 | background: #00739c; 91 | height: 8px; 92 | left: -4px; 93 | top: -4px; 94 | width: 8px; } 95 | 96 | @keyframes nux-pulse { 97 | 100% { 98 | background: rgba(0, 115, 156, 0); 99 | transform: scale(1); } } 100 | 101 | .nux-dot-tip .components-popover__content { 102 | width: 350px; } 103 | .nux-dot-tip .components-popover__content > div { 104 | padding: 20px 18px; } 105 | @media (min-width: 600px) { 106 | .nux-dot-tip .components-popover__content { 107 | width: 450px; } } 108 | .nux-dot-tip .components-popover__content .nux-dot-tip__disable { 109 | position: absolute; 110 | right: 0; 111 | top: 0; } 112 | 113 | .nux-dot-tip[data-y-axis="top"] { 114 | margin-top: -4px; } 115 | 116 | .nux-dot-tip[data-y-axis="bottom"] { 117 | margin-top: 4px; } 118 | 119 | .nux-dot-tip[data-y-axis="middle"][data-y-axis="left"] { 120 | margin-left: -4px; } 121 | 122 | .nux-dot-tip[data-y-axis="middle"][data-y-axis="right"] { 123 | margin-left: 4px; } 124 | 125 | .nux-dot-tip[data-y-axis="top"] .components-popover__content { 126 | margin-bottom: 20px; } 127 | 128 | .nux-dot-tip[data-y-axis="bottom"] .components-popover__content { 129 | margin-top: 20px; } 130 | 131 | .nux-dot-tip[data-y-axis="middle"][data-y-axis="left"] .components-popover__content { 132 | margin-right: 20px; } 133 | 134 | .nux-dot-tip[data-y-axis="middle"][data-y-axis="right"] .components-popover__content { 135 | margin-left: 20px; } 136 | 137 | .nux-dot-tip[data-y-axis="left"], .nux-dot-tip[data-y-axis="center"], .nux-dot-tip[data-y-axis="right"] { 138 | z-index: 1000001; } 139 | @media (max-width: 600px) { 140 | .nux-dot-tip[data-y-axis="left"] .components-popover__content, .nux-dot-tip[data-y-axis="center"] .components-popover__content, .nux-dot-tip[data-y-axis="right"] .components-popover__content { 141 | -ms-grid-row-align: end; 142 | align-self: end; 143 | left: 5px; 144 | margin: 20px 0 0 0; 145 | max-width: none !important; 146 | position: fixed; 147 | right: 5px; 148 | width: auto; } } 149 | 150 | .nux-dot-tip.components-popover:not([data-y-axis="middle"])[data-y-axis="right"] .components-popover__content { 151 | /*!rtl:ignore*/ 152 | margin-left: 0; } 153 | 154 | .nux-dot-tip.components-popover:not([data-y-axis="middle"])[data-y-axis="left"] .components-popover__content { 155 | /*!rtl:ignore*/ 156 | margin-right: 0; } 157 | 158 | .nux-dot-tip.components-popover.edit-post-more-menu__content:not([data-y-axis="middle"])[data-y-axis="right"] .components-popover__content { 159 | /*!rtl:ignore*/ 160 | margin-left: -12px; } 161 | 162 | .nux-dot-tip.components-popover.edit-post-more-menu__content:not([data-y-axis="middle"])[data-y-axis="left"] .components-popover__content { 163 | /*!rtl:ignore*/ 164 | margin-right: -12px; } 165 | -------------------------------------------------------------------------------- /public/vendor/gutenberg/styles/wp-nux/style.min.css: -------------------------------------------------------------------------------- 1 | :root{--wp-admin-theme-color:#007cba;--wp-admin-theme-color-darker-10:#006ba1;--wp-admin-theme-color-darker-20:#005a87}.nux-dot-tip:after,.nux-dot-tip:before{border-radius:100%;content:" ";pointer-events:none;position:absolute}.nux-dot-tip:before{animation:nux-pulse 1.6s cubic-bezier(.17,.67,.92,.62) infinite;background:rgba(0,115,156,.9);opacity:.9;height:24px;left:-12px;top:-12px;transform:scale(.33333);width:24px}.nux-dot-tip:after{background:#00739c;height:8px;left:-4px;top:-4px;width:8px}@keyframes nux-pulse{to{background:rgba(0,115,156,0);transform:scale(1)}}.nux-dot-tip .components-popover__content{width:350px}.nux-dot-tip .components-popover__content>div{padding:20px 18px}@media (min-width:600px){.nux-dot-tip .components-popover__content{width:450px}}.nux-dot-tip .components-popover__content .nux-dot-tip__disable{position:absolute;right:0;top:0}.nux-dot-tip[data-y-axis=top]{margin-top:-4px}.nux-dot-tip[data-y-axis=bottom]{margin-top:4px}.nux-dot-tip[data-y-axis=middle][data-y-axis=left]{margin-left:-4px}.nux-dot-tip[data-y-axis=middle][data-y-axis=right]{margin-left:4px}.nux-dot-tip[data-y-axis=top] .components-popover__content{margin-bottom:20px}.nux-dot-tip[data-y-axis=bottom] .components-popover__content{margin-top:20px}.nux-dot-tip[data-y-axis=middle][data-y-axis=left] .components-popover__content{margin-right:20px}.nux-dot-tip[data-y-axis=middle][data-y-axis=right] .components-popover__content{margin-left:20px}.nux-dot-tip[data-y-axis=center],.nux-dot-tip[data-y-axis=left],.nux-dot-tip[data-y-axis=right]{z-index:1000001}@media (max-width:600px){.nux-dot-tip[data-y-axis=center] .components-popover__content,.nux-dot-tip[data-y-axis=left] .components-popover__content,.nux-dot-tip[data-y-axis=right] .components-popover__content{-ms-grid-row-align:end;align-self:end;left:5px;margin:20px 0 0;max-width:none!important;position:fixed;right:5px;width:auto}}.nux-dot-tip.components-popover:not([data-y-axis=middle])[data-y-axis=right] .components-popover__content{ 2 | /*!rtl:ignore*/margin-left:0}.nux-dot-tip.components-popover:not([data-y-axis=middle])[data-y-axis=left] .components-popover__content{ 3 | /*!rtl:ignore*/margin-right:0}.nux-dot-tip.components-popover.edit-post-more-menu__content:not([data-y-axis=middle])[data-y-axis=right] .components-popover__content{ 4 | /*!rtl:ignore*/margin-left:-12px}.nux-dot-tip.components-popover.edit-post-more-menu__content:not([data-y-axis=middle])[data-y-axis=left] .components-popover__content{ 5 | /*!rtl:ignore*/margin-right:-12px} -------------------------------------------------------------------------------- /public/vendor/gutenberg/vendor/wp-polyfill-dom-rect.js: -------------------------------------------------------------------------------- 1 | (function (global) { 2 | function number(v) { 3 | return v === undefined ? 0 : Number(v); 4 | } 5 | 6 | function different(u, v) { 7 | return u !== v && !(isNaN(u) && isNaN(v)); 8 | } 9 | 10 | function DOMRect(xArg, yArg, wArg, hArg) { 11 | var x, y, width, height, left, right, top, bottom; 12 | 13 | x = number(xArg); 14 | y = number(yArg); 15 | width = number(wArg); 16 | height = number(hArg); 17 | 18 | Object.defineProperties(this, { 19 | x: { 20 | get: function () { return x; }, 21 | set: function (newX) { 22 | if (different(x, newX)) { 23 | x = newX; 24 | left = right = undefined; 25 | } 26 | }, 27 | enumerable: true 28 | }, 29 | y: { 30 | get: function () { return y; }, 31 | set: function (newY) { 32 | if (different(y, newY)) { 33 | y = newY; 34 | top = bottom = undefined; 35 | } 36 | }, 37 | enumerable: true 38 | }, 39 | width: { 40 | get: function () { return width; }, 41 | set: function (newWidth) { 42 | if (different(width, newWidth)) { 43 | width = newWidth; 44 | left = right = undefined; 45 | } 46 | }, 47 | enumerable: true 48 | }, 49 | height: { 50 | get: function () { return height; }, 51 | set: function (newHeight) { 52 | if (different(height, newHeight)) { 53 | height = newHeight; 54 | top = bottom = undefined; 55 | } 56 | }, 57 | enumerable: true 58 | }, 59 | left: { 60 | get: function () { 61 | if (left === undefined) { 62 | left = x + Math.min(0, width); 63 | } 64 | return left; 65 | }, 66 | enumerable: true 67 | }, 68 | right: { 69 | get: function () { 70 | if (right === undefined) { 71 | right = x + Math.max(0, width); 72 | } 73 | return right; 74 | }, 75 | enumerable: true 76 | }, 77 | top: { 78 | get: function () { 79 | if (top === undefined) { 80 | top = y + Math.min(0, height); 81 | } 82 | return top; 83 | }, 84 | enumerable: true 85 | }, 86 | bottom: { 87 | get: function () { 88 | if (bottom === undefined) { 89 | bottom = y + Math.max(0, height); 90 | } 91 | return bottom; 92 | }, 93 | enumerable: true 94 | } 95 | }); 96 | } 97 | 98 | global.DOMRect = DOMRect; 99 | }(this)); -------------------------------------------------------------------------------- /public/vendor/gutenberg/vendor/wp-polyfill-dom-rect.min.js: -------------------------------------------------------------------------------- 1 | !function(e){function d(e){return void 0===e?0:Number(e)}function g(e,t){return e!==t&&!(isNaN(e)&&isNaN(t))}e.DOMRect=function(e,t,n,i){var u,r,o,c,f,a,m,b;u=d(e),r=d(t),o=d(n),c=d(i),Object.defineProperties(this,{x:{get:function(){return u},set:function(e){g(u,e)&&(u=e,f=a=void 0)},enumerable:!0},y:{get:function(){return r},set:function(e){g(r,e)&&(r=e,m=b=void 0)},enumerable:!0},width:{get:function(){return o},set:function(e){g(o,e)&&(o=e,f=a=void 0)},enumerable:!0},height:{get:function(){return c},set:function(e){g(c,e)&&(c=e,m=b=void 0)},enumerable:!0},left:{get:function(){return void 0===f&&(f=u+Math.min(0,o)),f},enumerable:!0},right:{get:function(){return void 0===a&&(a=u+Math.max(0,o)),a},enumerable:!0},top:{get:function(){return void 0===m&&(m=r+Math.min(0,c)),m},enumerable:!0},bottom:{get:function(){return void 0===b&&(b=r+Math.max(0,c)),b},enumerable:!0}})}}(this); -------------------------------------------------------------------------------- /public/vendor/gutenberg/vendor/wp-polyfill-element-closest.js: -------------------------------------------------------------------------------- 1 | // element-closest | CC0-1.0 | github.com/jonathantneal/closest 2 | 3 | (function (ElementProto) { 4 | if (typeof ElementProto.matches !== 'function') { 5 | ElementProto.matches = ElementProto.msMatchesSelector || ElementProto.mozMatchesSelector || ElementProto.webkitMatchesSelector || function matches(selector) { 6 | var element = this; 7 | var elements = (element.document || element.ownerDocument).querySelectorAll(selector); 8 | var index = 0; 9 | 10 | while (elements[index] && elements[index] !== element) { 11 | ++index; 12 | } 13 | 14 | return Boolean(elements[index]); 15 | }; 16 | } 17 | 18 | if (typeof ElementProto.closest !== 'function') { 19 | ElementProto.closest = function closest(selector) { 20 | var element = this; 21 | 22 | while (element && element.nodeType === 1) { 23 | if (element.matches(selector)) { 24 | return element; 25 | } 26 | 27 | element = element.parentNode; 28 | } 29 | 30 | return null; 31 | }; 32 | } 33 | })(window.Element.prototype); 34 | -------------------------------------------------------------------------------- /public/vendor/gutenberg/vendor/wp-polyfill-element-closest.min.js: -------------------------------------------------------------------------------- 1 | !function(e){"function"!=typeof e.matches&&(e.matches=e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||function(e){for(var t=this,o=(t.document||t.ownerDocument).querySelectorAll(e),n=0;o[n]&&o[n]!==t;)++n;return Boolean(o[n])}),"function"!=typeof e.closest&&(e.closest=function(e){for(var t=this;t&&1===t.nodeType;){if(t.matches(e))return t;t=t.parentNode}return null})}(window.Element.prototype); -------------------------------------------------------------------------------- /public/vendor/gutenberg/vendor/wp-polyfill-node-contains.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | 3 | function contains(node) { 4 | if (!(0 in arguments)) { 5 | throw new TypeError('1 argument is required'); 6 | } 7 | 8 | do { 9 | if (this === node) { 10 | return true; 11 | } 12 | } while (node = node && node.parentNode); 13 | 14 | return false; 15 | } 16 | 17 | // IE 18 | if ('HTMLElement' in this && 'contains' in HTMLElement.prototype) { 19 | try { 20 | delete HTMLElement.prototype.contains; 21 | } catch (e) {} 22 | } 23 | 24 | if ('Node' in this) { 25 | Node.prototype.contains = contains; 26 | } else { 27 | document.contains = Element.prototype.contains = contains; 28 | } 29 | 30 | }()); 31 | -------------------------------------------------------------------------------- /public/vendor/gutenberg/vendor/wp-polyfill-node-contains.min.js: -------------------------------------------------------------------------------- 1 | !function(){function t(t){if(!(0 in arguments))throw new TypeError("1 argument is required");do{if(this===t)return!0}while(t=t&&t.parentNode);return!1}if("HTMLElement"in this&&"contains"in HTMLElement.prototype)try{delete HTMLElement.prototype.contains}catch(t){}"Node"in this?Node.prototype.contains=t:document.contains=Element.prototype.contains=t}(); -------------------------------------------------------------------------------- /public/vendor/gutenberg/wp-a11y.min.js: -------------------------------------------------------------------------------- 1 | /*! This file is auto-generated */ 2 | this.wp=this.wp||{},this.wp.a11y=function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=455)}({1:function(t,e){!function(){t.exports=this.wp.i18n}()},255:function(t,e){!function(){t.exports=this.wp.domReady}()},455:function(t,e,n){"use strict";n.r(e),n.d(e,"setup",(function(){return p})),n.d(e,"speak",(function(){return d}));var r=n(255),i=n.n(r),o=n(1);function a(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"polite",e=document.createElement("div");e.id="a11y-speak-".concat(t),e.className="a11y-speak-region",e.setAttribute("style","position: absolute;margin: -1px;padding: 0;height: 1px;width: 1px;overflow: hidden;clip: rect(1px, 1px, 1px, 1px);-webkit-clip-path: inset(50%);clip-path: inset(50%);border: 0;word-wrap: normal !important;"),e.setAttribute("aria-live",t),e.setAttribute("aria-relevant","additions text"),e.setAttribute("aria-atomic","true");var n=document,r=n.body;return r&&r.appendChild(e),e}var u="";function p(){var t=document.getElementById("a11y-speak-intro-text"),e=document.getElementById("a11y-speak-assertive"),n=document.getElementById("a11y-speak-polite");null===t&&function(){var t=document.createElement("p");t.id="a11y-speak-intro-text",t.className="a11y-speak-intro-text",t.textContent=Object(o.__)("Notifications"),t.setAttribute("style","position: absolute;margin: -1px;padding: 0;height: 1px;width: 1px;overflow: hidden;clip: rect(1px, 1px, 1px, 1px);-webkit-clip-path: inset(50%);clip-path: inset(50%);border: 0;word-wrap: normal !important;"),t.setAttribute("hidden","hidden");var e=document.body;e&&e.appendChild(t)}(),null===e&&a("assertive"),null===n&&a("polite")}function d(t,e){!function(){for(var t=document.getElementsByClassName("a11y-speak-region"),e=document.getElementById("a11y-speak-intro-text"),n=0;n]+>/g," "),u===t&&(t+=" "),u=t,t}(t);var n=document.getElementById("a11y-speak-intro-text"),r=document.getElementById("a11y-speak-assertive"),i=document.getElementById("a11y-speak-polite");r&&"assertive"===e?r.textContent=t:i&&(i.textContent=t),n&&n.removeAttribute("hidden")}i()(p)}}); -------------------------------------------------------------------------------- /public/vendor/gutenberg/wp-blob.min.js: -------------------------------------------------------------------------------- 1 | /*! This file is auto-generated */ 2 | this.wp=this.wp||{},this.wp.blob=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},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 r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},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=280)}({280:function(e,t,n){"use strict";n.r(t),n.d(t,"createBlobURL",(function(){return f})),n.d(t,"getBlobByURL",(function(){return c})),n.d(t,"revokeBlobURL",(function(){return l})),n.d(t,"isBlobURL",(function(){return d}));var r=window.URL,o=r.createObjectURL,u=r.revokeObjectURL,i={};function f(e){var t=o(e);return i[t]=e,t}function c(e){return i[e]}function l(e){i[e]&&u(e),delete i[e]}function d(e){return!(!e||!e.indexOf)&&0===e.indexOf("blob:")}}}); -------------------------------------------------------------------------------- /public/vendor/gutenberg/wp-block-serialization-default-parser.min.js: -------------------------------------------------------------------------------- 1 | /*! This file is auto-generated */ 2 | this.wp=this.wp||{},this.wp.blockSerializationDefaultParser=function(t){var n={};function r(e){if(n[e])return n[e].exports;var o=n[e]={i:e,l:!1,exports:{}};return t[e].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=n,r.d=function(t,n,e){r.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:e})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,n){if(1&n&&(t=r(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var e=Object.create(null);if(r.r(e),Object.defineProperty(e,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var o in t)r.d(e,o,function(n){return t[n]}.bind(null,o));return e},r.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(n,"a",n),n},r.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},r.p="",r(r.s=299)}({13:function(t,n,r){"use strict";r.d(n,"a",(function(){return i}));var e=r(38);var o=r(29),u=r(39);function i(t,n){return Object(e.a)(t)||function(t,n){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var r=[],e=!0,o=!1,u=void 0;try{for(var i,c=t[Symbol.iterator]();!(e=(i=c.next()).done)&&(r.push(i.value),!n||r.length!==n);e=!0);}catch(t){o=!0,u=t}finally{try{e||null==c.return||c.return()}finally{if(o)throw u}}return r}}(t,n)||Object(o.a)(t,n)||Object(u.a)()}},26:function(t,n,r){"use strict";function e(t,n){(null==n||n>t.length)&&(n=t.length);for(var r=0,e=new Array(n);r)[^])*)\5|[^]*?)}\s+)?(\/)?-->/g;function l(t,n,r,e,o){return{blockName:t,attrs:n,innerBlocks:r,innerHTML:e,innerContent:o}}function f(t){return l(null,{},[],t,[t])}var s=function(t){e=t,o=0,u=[],i=[],a.lastIndex=0;do{}while(p());return u};function p(){var t=function(){var t=a.exec(e);if(null===t)return["no-more-tokens"];var n=t.index,r=Object(c.a)(t,7),o=r[0],u=r[1],i=r[2],l=r[3],f=r[4],s=r[6],p=o.length,b=!!u,d=!!s,v=(i||"core/")+l,h=!!f,y=h?function(t){try{return JSON.parse(t)}catch(t){return null}}(f):{};if(d)return["void-block",v,y,n,p];if(b)return["block-closer",v,null,n,p];return["block-opener",v,y,n,p]}(),n=Object(c.a)(t,5),r=n[0],s=n[1],p=n[2],h=n[3],y=n[4],k=i.length,O=h>o?o:null;switch(r){case"no-more-tokens":if(0===k)return b(),!1;if(1===k)return v(),!1;for(;0t.length)&&(e=t.length);for(var r=0,n=new Array(e);r2?r-2:0),o=2;o2?r-2:0),o=2;o2?r-2:0),o=2;o1&&void 0!==arguments[1]?arguments[1]:{},n=t.version,c=t.alternative,i=t.plugin,u=t.link,a=t.hint,l=i?" from ".concat(i):"",f=n?" and will be removed".concat(l," in version ").concat(n):"",d=c?" Please use ".concat(c," instead."):"",s=u?" See: ".concat(u):"",p=a?" Note: ".concat(a):"",b="".concat(e," is deprecated").concat(f,".").concat(d).concat(s).concat(p);b in o||(Object(r.doAction)("deprecated",e,t,b),console.warn(b),o[b]=!0)}}}).default; -------------------------------------------------------------------------------- /public/vendor/gutenberg/wp-dom-ready.min.js: -------------------------------------------------------------------------------- 1 | /*! This file is auto-generated */ 2 | this.wp=this.wp||{},this.wp.domReady=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},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 r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},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=415)}({415:function(e,t,n){"use strict";function r(e){"complete"!==document.readyState&&"interactive"!==document.readyState?document.addEventListener("DOMContentLoaded",e):e()}n.r(t),n.d(t,"default",(function(){return r}))}}).default; -------------------------------------------------------------------------------- /public/vendor/gutenberg/wp-escape-html.min.js: -------------------------------------------------------------------------------- 1 | /*! This file is auto-generated */ 2 | this.wp=this.wp||{},this.wp.escapeHtml=function(e){var t={};function n(r){if(t[r])return t[r].exports;var u=t[r]={i:r,l:!1,exports:{}};return e[r].call(u.exports,u,u.exports,n),u.l=!0,u.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},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 r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var u in e)n.d(r,u,function(t){return e[t]}.bind(null,u));return r},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=461)}({461:function(e,t,n){"use strict";n.r(t),n.d(t,"escapeAmpersand",(function(){return u})),n.d(t,"escapeQuotationMark",(function(){return o})),n.d(t,"escapeLessThan",(function(){return i})),n.d(t,"escapeAttribute",(function(){return c})),n.d(t,"escapeHTML",(function(){return a})),n.d(t,"escapeEditableHTML",(function(){return f})),n.d(t,"isValidAttributeName",(function(){return p}));var r=/[\u007F-\u009F "'>/="\uFDD0-\uFDEF]/;function u(e){return e.replace(/&(?!([a-z0-9]+|#[0-9]+|#x[a-f0-9]+);)/gi,"&")}function o(e){return e.replace(/"/g,""")}function i(e){return e.replace(//g,">")}(o(u(e)))}function a(e){return i(u(e))}function f(e){return i(e.replace(/&/g,"&"))}function p(e){return!r.test(e)}}}); -------------------------------------------------------------------------------- /public/vendor/gutenberg/wp-html-entities.min.js: -------------------------------------------------------------------------------- 1 | /*! This file is auto-generated */ 2 | this.wp=this.wp||{},this.wp.htmlEntities=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},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 r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},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=418)}({418:function(e,t,n){"use strict";var r;function o(e){if("string"!=typeof e||-1===e.indexOf("&"))return e;void 0===r&&(r=document.implementation&&document.implementation.createHTMLDocument?document.implementation.createHTMLDocument("").createElement("textarea"):document.createElement("textarea")),r.innerHTML=e;var t=r.textContent;return r.innerHTML="",t}n.r(t),n.d(t,"decodeEntities",(function(){return o}))}}); -------------------------------------------------------------------------------- /public/vendor/gutenberg/wp-is-shallow-equal.min.js: -------------------------------------------------------------------------------- 1 | /*! This file is auto-generated */ 2 | this.wp=this.wp||{},this.wp.isShallowEqual=function(r){var t={};function e(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return r[n].call(o.exports,o,o.exports,e),o.l=!0,o.exports}return e.m=r,e.c=t,e.d=function(r,t,n){e.o(r,t)||Object.defineProperty(r,t,{enumerable:!0,get:n})},e.r=function(r){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},e.t=function(r,t){if(1&t&&(r=e(r)),8&t)return r;if(4&t&&"object"==typeof r&&r&&r.__esModule)return r;var n=Object.create(null);if(e.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:r}),2&t&&"string"!=typeof r)for(var o in r)e.d(n,o,function(t){return r[t]}.bind(null,o));return n},e.n=function(r){var t=r&&r.__esModule?function(){return r.default}:function(){return r};return e.d(t,"a",t),t},e.o=function(r,t){return Object.prototype.hasOwnProperty.call(r,t)},e.p="",e(e.s=419)}({419:function(r,t,e){"use strict";var n=e(420),o=e(421),u=Array.isArray;r.exports=function(r,t){if(r&&t){if(r.constructor===Object&&t.constructor===Object)return n(r,t);if(u(r)&&u(t))return o(r,t)}return r===t},r.exports.isShallowEqualObjects=n,r.exports.isShallowEqualArrays=o},420:function(r,t,e){"use strict";var n=Object.keys;r.exports=function(r,t){var e,o,u,i,f;if(r===t)return!0;if(e=n(r),o=n(t),e.length!==o.length)return!1;for(u=0;ut.length)&&(n=t.length);for(var r=0,e=new Array(n);r0&&void 0!==arguments[0]?arguments[0]:window,n=t.navigator.platform;return-1!==n.indexOf("Mac")||Object(o.includes)(["iPad","iPhone"],n)}var a=8,f=9,l=13,d=27,b=32,s=37,O=38,j=39,p=40,y=46,v=121,m="alt",h="ctrl",g="meta",S="shift",A=48,w={primary:function(t){return t()?[g]:[h]},primaryShift:function(t){return t()?[S,g]:[h,S]},primaryAlt:function(t){return t()?[m,g]:[h,m]},secondary:function(t){return t()?[S,m,g]:[h,S,m]},access:function(t){return t()?[h,m]:[S,m]},ctrl:function(){return[h]},alt:function(){return[m]},ctrlShift:function(){return[h,S]},shift:function(){return[S]},shiftAlt:function(){return[S,m]}},C=Object(o.mapValues)(w,(function(t){return function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i;return[].concat(Object(u.a)(t(r)),[n.toLowerCase()]).join("+")}})),E=Object(o.mapValues)(w,(function(t){return function(n){var r,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i,a=c(),f=(r={},Object(e.a)(r,m,a?"⌥":"Alt"),Object(e.a)(r,h,a?"^":"Ctrl"),Object(e.a)(r,g,"⌘"),Object(e.a)(r,S,a?"⇧":"Shift"),r),l=t(c).reduce((function(t,n){var r=Object(o.get)(f,n,n);return[].concat(Object(u.a)(t),a?[r]:[r,"+"])}),[]),d=Object(o.capitalize)(n);return[].concat(Object(u.a)(l),[d])}})),P=Object(o.mapValues)(E,(function(t){return function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i;return t(n,r).join("")}})),_=Object(o.mapValues)(w,(function(t){return function(n){var r,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i,f=a(),l=(r={},Object(e.a)(r,S,"Shift"),Object(e.a)(r,g,f?"Command":"Control"),Object(e.a)(r,h,"Control"),Object(e.a)(r,m,f?"Option":"Alt"),Object(e.a)(r,",",Object(c.__)("Comma")),Object(e.a)(r,".",Object(c.__)("Period")),Object(e.a)(r,"`",Object(c.__)("Backtick")),r);return[].concat(Object(u.a)(t(a)),[n]).map((function(t){return Object(o.capitalize)(Object(o.get)(l,t,t))})).join(f?" ":" + ")}}));function T(t){return[m,h,g,S].filter((function(n){return t["".concat(n,"Key")]}))}var x=Object(o.mapValues)(w,(function(t){return function(n,r){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:i,u=t(e),c=T(n);return!Object(o.xor)(u,c).length&&(r?n.key===r:Object(o.includes)(u,n.key.toLowerCase()))}}))},5:function(t,n,r){"use strict";function e(t,n,r){return n in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,t}r.d(n,"a",(function(){return e}))}}); -------------------------------------------------------------------------------- /public/vendor/gutenberg/wp-notices.min.js: -------------------------------------------------------------------------------- 1 | /*! This file is auto-generated */ 2 | this.wp=this.wp||{},this.wp.notices=function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=451)}({17:function(t,e,r){"use strict";r.d(e,"a",(function(){return c}));var n=r(26);var o=r(35),i=r(29);function c(t){return function(t){if(Array.isArray(t))return Object(n.a)(t)}(t)||Object(o.a)(t)||Object(i.a)(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},2:function(t,e){!function(){t.exports=this.lodash}()},26:function(t,e,r){"use strict";function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0,o=n[t];if(void 0===o)return r;var i=e(r[o],n);return i===r[o]?r:s({},r,Object(a.a)({},o,i))}}}("context")((function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"CREATE_NOTICE":return[].concat(Object(c.a)(Object(u.reject)(t,{id:e.notice.id})),[e.notice]);case"REMOVE_NOTICE":return Object(u.reject)(t,{id:e.id})}return t}));function d(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"info",e=arguments.length>1?arguments[1]:void 0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=r.speak,o=void 0===n||n,i=r.isDismissible,c=void 0===i||i,a=r.context,f=void 0===a?"global":a,s=r.id,l=void 0===s?Object(u.uniqueId)(f):s,d=r.actions,b=void 0===d?[]:d,p=r.type,v=void 0===p?"default":p,O=r.__unstableHTML;return{type:"CREATE_NOTICE",context:f,notice:{id:l,status:t,content:e=String(e),spokenMessage:o?e:null,__unstableHTML:O,isDismissible:c,actions:b,type:v}}}function b(t,e){return d("success",t,e)}function p(t,e){return d("info",t,e)}function v(t,e){return d("error",t,e)}function O(t,e){return d("warning",t,e)}function y(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"global";return{type:"REMOVE_NOTICE",id:t,context:e}}var g=[];function j(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"global";return t[e]||g}Object(i.registerStore)("core/notices",{reducer:l,actions:n,selectors:o})},5:function(t,e,r){"use strict";function n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}r.d(e,"a",(function(){return n}))}}); -------------------------------------------------------------------------------- /public/vendor/gutenberg/wp-primitives.min.js: -------------------------------------------------------------------------------- 1 | /*! This file is auto-generated */ 2 | this.wp=this.wp||{},this.wp.primitives=function(e){var t={};function r(n){if(t[n])return t[n].exports;var u=t[n]={i:n,l:!1,exports:{}};return e[n].call(u.exports,u,u.exports,r),u.l=!0,u.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var u in e)r.d(n,u,function(t){return e[t]}.bind(null,u));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=459)}({0:function(e,t){!function(){e.exports=this.wp.element}()},11:function(e,t,r){var n; 3 | /*! 4 | Copyright (c) 2017 Jed Watson. 5 | Licensed under the MIT License (MIT), see 6 | http://jedwatson.github.io/classnames 7 | */!function(){"use strict";var r={}.hasOwnProperty;function u(){for(var e=[],t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}},41:function(e,t,r){"use strict";function n(e,t){if(null==e)return{};var r,n,u={},o=Object.keys(e);for(n=0;n=0||(u[r]=e[r]);return u}r.d(t,"a",(function(){return n}))},459:function(e,t,r){"use strict";r.r(t),r.d(t,"Circle",(function(){return a})),r.d(t,"G",(function(){return l})),r.d(t,"Path",(function(){return s})),r.d(t,"Polygon",(function(){return p})),r.d(t,"Rect",(function(){return b})),r.d(t,"Defs",(function(){return d})),r.d(t,"RadialGradient",(function(){return O})),r.d(t,"LinearGradient",(function(){return y})),r.d(t,"Stop",(function(){return j})),r.d(t,"SVG",(function(){return v})),r.d(t,"HorizontalRule",(function(){return m})),r.d(t,"BlockQuotation",(function(){return g}));var n=r(5),u=r(14),o=r(11),c=r.n(o),i=r(0);function f(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}var a=function(e){return Object(i.createElement)("circle",e)},l=function(e){return Object(i.createElement)("g",e)},s=function(e){return Object(i.createElement)("path",e)},p=function(e){return Object(i.createElement)("polygon",e)},b=function(e){return Object(i.createElement)("rect",e)},d=function(e){return Object(i.createElement)("defs",e)},O=function(e){return Object(i.createElement)("radialGradient",e)},y=function(e){return Object(i.createElement)("linearGradient",e)},j=function(e){return Object(i.createElement)("stop",e)},v=function(e){var t=e.className,r=e.isPressed,o=function(e){for(var t=1;t0};do{if(0===e.length)return void(n=!1);var f=e.shift();t.get(f)(),t.delete(f)}while(i());r(u)};return{add:function(o,i){t.has(o)||e.push(o),t.set(o,i),n||(n=!0,r(u))},flush:function(n){if(!t.has(n))return!1;var r=e.indexOf(n);e.splice(r,1);var u=t.get(n);return t.delete(n),u(),!0},reset:function(){e=[],t=new WeakMap,n=!1}}}}}); -------------------------------------------------------------------------------- /public/vendor/gutenberg/wp-shortcode.min.js: -------------------------------------------------------------------------------- 1 | /*! This file is auto-generated */ 2 | this.wp=this.wp||{},this.wp.shortcode=function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=427)}({2:function(t,e){!function(){t.exports=this.lodash}()},427:function(t,e,n){"use strict";n.r(e),n.d(e,"next",(function(){return u})),n.d(e,"replace",(function(){return o})),n.d(e,"string",(function(){return c})),n.d(e,"regexp",(function(){return s})),n.d(e,"attrs",(function(){return a})),n.d(e,"fromMatch",(function(){return f}));var r=n(2),i=n(50);function u(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=s(t);r.lastIndex=n;var i=r.exec(e);if(i){if("["===i[1]&&"]"===i[7])return u(t,e,r.lastIndex);var o={index:i.index,content:i[0],shortcode:f(i)};return i[1]&&(o.content=o.content.slice(1),o.index++),i[7]&&(o.content=o.content.slice(0,-1)),o}}function o(t,e,n){return e.replace(s(t),(function(t,e,r,i,u,o,c,s){if("["===e&&"]"===s)return t;var a=n(f(arguments));return a?e+a+s:t}))}function c(t){return new l(t).string()}function s(t){return new RegExp("\\[(\\[?)("+t+")(?![\\w-])([^\\]\\/]*(?:\\/(?!\\])[^\\]\\/]*)*?)(?:(\\/)\\]|\\](?:([^\\[]*(?:\\[(?!\\/\\2\\])[^\\[]*)*)(\\[\\/\\2\\]))?)(\\]?)","g")}var a=n.n(i)()((function(t){var e,n={},r=[],i=/([\w-]+)\s*=\s*"([^"]*)"(?:\s|$)|([\w-]+)\s*=\s*'([^']*)'(?:\s|$)|([\w-]+)\s*=\s*([^\s'"]+)(?:\s|$)|"([^"]*)"(?:\s|$)|'([^']*)'(?:\s|$)|(\S+)(?:\s|$)/g;for(t=t.replace(/[\u00a0\u200b]/g," ");e=i.exec(t);)e[1]?n[e[1].toLowerCase()]=e[2]:e[3]?n[e[3].toLowerCase()]=e[4]:e[5]?n[e[5].toLowerCase()]=e[6]:e[7]?r.push(e[7]):e[8]?r.push(e[8]):e[9]&&r.push(e[9]);return{named:n,numeric:r}}));function f(t){var e;return e=t[4]?"self-closing":t[6]?"closed":"single",new l({tag:t[2],attrs:t[3],type:e,content:t[5]})}var l=Object(r.extend)((function(t){var e=this;Object(r.extend)(this,Object(r.pick)(t||{},"tag","attrs","type","content"));var n=this.attrs;this.attrs={named:{},numeric:[]},n&&(Object(r.isString)(n)?this.attrs=a(n):Object(r.isEqual)(Object.keys(n),["named","numeric"])?this.attrs=n:Object(r.forEach)(n,(function(t,n){e.set(n,t)})))}),{next:u,replace:o,string:c,regexp:s,attrs:a,fromMatch:f});Object(r.extend)(l.prototype,{get:function(t){return this.attrs[Object(r.isNumber)(t)?"numeric":"named"][t]},set:function(t,e){return this.attrs[Object(r.isNumber)(t)?"numeric":"named"][t]=e,this},string:function(){var t="["+this.tag;return Object(r.forEach)(this.attrs.numeric,(function(e){/\s/.test(e)?t+=' "'+e+'"':t+=" "+e})),Object(r.forEach)(this.attrs.named,(function(e,n){t+=" "+n+'="'+e+'"'})),"single"===this.type?t+"]":"self-closing"===this.type?t+" /]":(t+="]",this.content&&(t+=this.content),t+"[/"+this.tag+"]")}}),e.default=l},50:function(t,e,n){t.exports=function(t,e){var n,r,i=0;function u(){var u,o,c=n,s=arguments.length;t:for(;c;){if(c.args.length===arguments.length){for(o=0;o0&&void 0!==arguments[0]?arguments[0]:"";Object(a.a)(this,e),this.value=t,this._currentValue,this._valueAsArray}return Object(i.a)(e,[{key:"entries",value:function(){var e;return(e=this._valueAsArray).entries.apply(e,arguments)}},{key:"forEach",value:function(){var e;return(e=this._valueAsArray).forEach.apply(e,arguments)}},{key:"keys",value:function(){var e;return(e=this._valueAsArray).keys.apply(e,arguments)}},{key:"values",value:function(){var e;return(e=this._valueAsArray).values.apply(e,arguments)}},{key:"toString",value:function(){return this.value}},{key:Symbol.iterator,value:u.a.mark((function e(){return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.delegateYield(this._valueAsArray,"t0",1);case 1:return e.abrupt("return",e.t0);case 2:case"end":return e.stop()}}),e,this)}))},{key:"item",value:function(e){return this._valueAsArray[e]}},{key:"contains",value:function(e){return-1!==this._valueAsArray.indexOf(e)}},{key:"add",value:function(){for(var e=arguments.length,t=new Array(e),r=0;rt.length)&&(e=t.length);for(var n=0,r=new Array(e);n0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"SET_IS_MATCHING":return e.values}return t};function u(t){return{type:"SET_IS_MATCHING",values:t}}function a(t,e){return-1===e.indexOf(" ")&&(e=">= "+e),!!t[e]}Object(i.registerStore)("core/viewport",{reducer:c,actions:r,selectors:o});var f=n(2),s=function(t,e){var n=Object(f.debounce)((function(){var t=Object(f.mapValues)(r,(function(t){return t.matches}));Object(i.dispatch)("core/viewport").setIsMatching(t)}),{leading:!0}),r=Object(f.reduce)(t,(function(t,r,o){return Object(f.forEach)(e,(function(e,i){var c=window.matchMedia("(".concat(e,": ").concat(r,"px)"));c.addListener(n);var u=[i,o].join(" ");t[u]=c})),t}),{});window.addEventListener("orientationchange",n),n(),n.flush()},l=n(9),p=n(8),d=n(13),b=n(0),h=function(t){return Object(l.createHigherOrderComponent)((function(e){return Object(l.pure)((function(n){var r=Object(f.mapValues)(t,(function(t){var e=t.split(" "),n=Object(d.a)(e,2),r=n[0],o=n[1];return void 0===o&&(o=r,r=">="),Object(l.useViewportMatch)(o,r)}));return Object(b.createElement)(e,Object(p.a)({},n,r))}))}),"withViewportMatch")},v=function(t){return Object(l.createHigherOrderComponent)(Object(l.compose)([h({isViewportMatch:t}),Object(l.ifCondition)((function(t){return t.isViewportMatch}))]),"ifViewportMatches")};s({huge:1440,wide:1280,large:960,medium:782,small:600,mobile:480},{"<":"max-width",">=":"min-width"})},8:function(t,e,n){"use strict";function r(){return(r=Object.assign||function(t){for(var e=1;e1)for(var n=1;n]*?>/gi,HTMLcommentRegExp://g,spaceRegExp:/ | /gi,HTMLEntityRegExp:/&\S+?;/g,connectorRegExp:/--|\u2014/g,removeRegExp:new RegExp(["[","!-@[-`{-~","€-¿×÷"," -⯿","⸀-⹿","]"].join(""),"g"),astralRegExp:/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,wordsRegExp:/\S\s+/g,characters_excluding_spacesRegExp:/\S/g,characters_including_spacesRegExp:/[^\f\n\r\t\v\u00AD\u2028\u2029]/g,l10n:{type:"words"}};function i(e,t){if(e.HTMLRegExp)return t.replace(e.HTMLRegExp,"\n")}function c(e,t){return e.astralRegExp?t.replace(e.astralRegExp,"a"):t}function u(e,t){return e.HTMLEntityRegExp?t.replace(e.HTMLEntityRegExp,""):t}function p(e,t){return e.connectorRegExp?t.replace(e.connectorRegExp," "):t}function s(e,t){return e.removeRegExp?t.replace(e.removeRegExp,""):t}function a(e,t){return e.HTMLcommentRegExp?t.replace(e.HTMLcommentRegExp,""):t}function g(e,t){return e.shortcodesRegExp?t.replace(e.shortcodesRegExp,"\n"):t}function d(e,t){if(e.spaceRegExp)return t.replace(e.spaceRegExp," ")}function f(e,t){return e.HTMLEntityRegExp?t.replace(e.HTMLEntityRegExp,"a"):t}function l(e,t,n){if(""===e)return 0;if(e){var l=function(e,t){var n=Object(r.extend)(o,t);return n.shortcodes=n.l10n.shortcodes||{},n.shortcodes&&n.shortcodes.length&&(n.shortcodesRegExp=new RegExp("\\[\\/?(?:"+n.shortcodes.join("|")+")[^\\]]*?\\]","g")),n.type=e||n.l10n.type,"characters_excluding_spaces"!==n.type&&"characters_including_spaces"!==n.type&&(n.type="words"),n}(t,n),x=l[t+"RegExp"],E="words"===l.type?function(e,t,n){return e=Object(r.flow)(i.bind(this,n),a.bind(this,n),g.bind(this,n),d.bind(this,n),u.bind(this,n),p.bind(this,n),s.bind(this,n))(e),(e+="\n").match(t)}(e,x,l):function(e,t,n){return e=Object(r.flow)(i.bind(this,n),a.bind(this,n),g.bind(this,n),d.bind(this,n),c.bind(this,n),f.bind(this,n))(e),(e+="\n").match(t)}(e,x,l);return E?E.length:0}}}}); -------------------------------------------------------------------------------- /public/vendor/no-conflict.js: -------------------------------------------------------------------------------- 1 | window.lodash = window._.noConflict(); 2 | -------------------------------------------------------------------------------- /scripts/g-scripts.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const fs = require('fs'); 4 | const runner = require('child_process'); 5 | 6 | // const file = './public/vendor/gutenberg/wp-script-loader-packages.php'; 7 | 8 | // TODO: check if it's a file. 9 | const file = './tmp/WordPress/wp-includes/assets/script-loader-packages.php'; 10 | 11 | runner.exec('php -r \'print json_encode(include("' + file + '"));\'', function(err, stdout, stderr) { 12 | const json = JSON.stringify(JSON.parse(stdout)); 13 | fs.writeFile('./config/gutenberg/scripts.json', json, (err) => { 14 | // In case of a error throw err. 15 | if (err) { 16 | console.log(err); 17 | throw err; 18 | } 19 | }); 20 | }); 21 | -------------------------------------------------------------------------------- /scripts/g-update.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const fs = require('fs') 4 | 5 | // Get updated list of dependencies 6 | const packages = require('../config/gutenberg')(); 7 | 8 | const scripts = packages.scripts.reduce((html, script) => { 9 | if (!script.path) { 10 | return html; 11 | } 12 | 13 | return html + ''; 14 | }, ''); 15 | 16 | const styles = packages.styles.reduce((html, style) => { 17 | if (!style.path) { 18 | return html; 19 | } 20 | 21 | return html + ''; 22 | }, ''); 23 | 24 | fs.writeFile('g-scripts.txt', scripts, (err) => { 25 | // In case of a error throw err. 26 | if (err) { 27 | console.log(err); 28 | throw err; 29 | } 30 | }); 31 | 32 | fs.writeFile('g-styles.txt', styles, (err) => { 33 | // In case of a error throw err. 34 | if (err) { 35 | console.log(err); 36 | throw err; 37 | } 38 | }); 39 | -------------------------------------------------------------------------------- /scripts/start.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | // Do this as the first thing so that any code reading it knows the right env. 4 | process.env.BABEL_ENV = 'development'; 5 | process.env.NODE_ENV = 'development'; 6 | 7 | // Makes the script crash on unhandled rejections instead of silently 8 | // ignoring them. In the future, promise rejections that are not handled will 9 | // terminate the Node.js process with a non-zero exit code. 10 | process.on('unhandledRejection', err => { 11 | throw err; 12 | }); 13 | 14 | // Ensure environment variables are read. 15 | require('../config/env'); 16 | 17 | 18 | const fs = require('fs'); 19 | const chalk = require('chalk'); 20 | const webpack = require('webpack'); 21 | const WebpackDevServer = require('webpack-dev-server'); 22 | const clearConsole = require('react-dev-utils/clearConsole'); 23 | const checkRequiredFiles = require('react-dev-utils/checkRequiredFiles'); 24 | const { 25 | choosePort, 26 | createCompiler, 27 | prepareProxy, 28 | prepareUrls, 29 | } = require('react-dev-utils/WebpackDevServerUtils'); 30 | const openBrowser = require('react-dev-utils/openBrowser'); 31 | const paths = require('../config/paths'); 32 | const config = require('../config/webpack.config.dev'); 33 | const createDevServerConfig = require('../config/webpackDevServer.config'); 34 | 35 | const useYarn = fs.existsSync(paths.yarnLockFile); 36 | const isInteractive = process.stdout.isTTY; 37 | 38 | // Warn and crash if required files are missing 39 | if (!checkRequiredFiles([paths.appHtml, paths.appIndexJs])) { 40 | process.exit(1); 41 | } 42 | 43 | // Tools like Cloud9 rely on this. 44 | const DEFAULT_PORT = parseInt(process.env.PORT, 10) || 3000; 45 | const HOST = process.env.HOST || '0.0.0.0'; 46 | 47 | if (process.env.HOST) { 48 | console.log( 49 | chalk.cyan( 50 | `Attempting to bind to HOST environment variable: ${chalk.yellow( 51 | chalk.bold(process.env.HOST) 52 | )}` 53 | ) 54 | ); 55 | console.log( 56 | `If this was unintentional, check that you haven't mistakenly set it in your shell.` 57 | ); 58 | console.log( 59 | `Learn more here: ${chalk.yellow('http://bit.ly/CRA-advanced-config')}` 60 | ); 61 | console.log(); 62 | } 63 | 64 | // We require that you explictly set browsers and do not fall back to 65 | // browserslist defaults. 66 | const { checkBrowsers } = require('react-dev-utils/browsersHelper'); 67 | checkBrowsers(paths.appPath, isInteractive) 68 | .then(() => { 69 | // We attempt to use the default port but if it is busy, we offer the user to 70 | // run on a different port. `choosePort()` Promise resolves to the next free port. 71 | return choosePort(HOST, DEFAULT_PORT); 72 | }) 73 | .then(port => { 74 | if (port == null) { 75 | // We have not found a port. 76 | return; 77 | } 78 | const protocol = process.env.HTTPS === 'true' ? 'https' : 'http'; 79 | const appName = require(paths.appPackageJson).name; 80 | const urls = prepareUrls(protocol, HOST, port); 81 | // Create a webpack compiler that is configured with custom messages. 82 | const compiler = createCompiler(webpack, config, appName, urls, useYarn); 83 | // Load proxy config 84 | const proxySetting = require(paths.appPackageJson).proxy; 85 | const proxyConfig = prepareProxy(proxySetting, paths.appPublic); 86 | // Serve webpack assets generated by the compiler over a web server. 87 | const serverConfig = createDevServerConfig( 88 | proxyConfig, 89 | urls.lanUrlForConfig 90 | ); 91 | const devServer = new WebpackDevServer(compiler, serverConfig); 92 | // Launch WebpackDevServer. 93 | devServer.listen(port, HOST, err => { 94 | if (err) { 95 | return console.log(err); 96 | } 97 | if (isInteractive) { 98 | clearConsole(); 99 | } 100 | console.log(chalk.cyan('Starting the development server...\n')); 101 | openBrowser(urls.localUrlForBrowser); 102 | }); 103 | 104 | ['SIGINT', 'SIGTERM'].forEach(function(sig) { 105 | process.on(sig, function() { 106 | devServer.close(); 107 | process.exit(); 108 | }); 109 | }); 110 | }) 111 | .catch(err => { 112 | if (err && err.message) { 113 | console.log(err.message); 114 | } 115 | process.exit(1); 116 | }); 117 | -------------------------------------------------------------------------------- /scripts/test.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | // Do this as the first thing so that any code reading it knows the right env. 4 | process.env.BABEL_ENV = 'test'; 5 | process.env.NODE_ENV = 'test'; 6 | process.env.PUBLIC_URL = ''; 7 | 8 | // Makes the script crash on unhandled rejections instead of silently 9 | // ignoring them. In the future, promise rejections that are not handled will 10 | // terminate the Node.js process with a non-zero exit code. 11 | process.on('unhandledRejection', err => { 12 | throw err; 13 | }); 14 | 15 | // Ensure environment variables are read. 16 | require('../config/env'); 17 | 18 | 19 | const jest = require('jest'); 20 | const execSync = require('child_process').execSync; 21 | let argv = process.argv.slice(2); 22 | 23 | function isInGitRepository() { 24 | try { 25 | execSync('git rev-parse --is-inside-work-tree', { stdio: 'ignore' }); 26 | return true; 27 | } catch (e) { 28 | return false; 29 | } 30 | } 31 | 32 | function isInMercurialRepository() { 33 | try { 34 | execSync('hg --cwd . root', { stdio: 'ignore' }); 35 | return true; 36 | } catch (e) { 37 | return false; 38 | } 39 | } 40 | 41 | // Watch unless on CI, in coverage mode, or explicitly running all tests 42 | if ( 43 | !process.env.CI && 44 | argv.indexOf('--coverage') === -1 && 45 | argv.indexOf('--watchAll') === -1 46 | ) { 47 | // https://github.com/facebook/create-react-app/issues/5210 48 | const hasSourceControl = isInGitRepository() || isInMercurialRepository(); 49 | argv.push(hasSourceControl ? '--watch' : '--watchAll'); 50 | } 51 | 52 | 53 | jest.run(argv); 54 | -------------------------------------------------------------------------------- /src/core/api-fetch.js: -------------------------------------------------------------------------------- 1 | 2 | import apiFetch from '../globals/api-fetch'; 3 | 4 | const { 5 | use, 6 | createNonceMiddleware, 7 | createRootURLMiddleware, 8 | setFetchHandler, 9 | } = window.wp.apiFetch; 10 | 11 | const nonceMiddleware = createNonceMiddleware(window.wpApiSettings.nonce); 12 | 13 | use(nonceMiddleware); 14 | 15 | window.wp.hooks.addAction( 16 | 'heartbeat.tick', 17 | 'core/api-fetch/create-nonce-middleware', 18 | function (response) { 19 | if (response.rest_nonce) { 20 | nonceMiddleware.nonce = response.rest_nonce; 21 | } 22 | } 23 | ); 24 | 25 | use(createRootURLMiddleware(window.wpApiSettings.root)); 26 | 27 | setFetchHandler(apiFetch); 28 | -------------------------------------------------------------------------------- /src/core/index.js: -------------------------------------------------------------------------------- 1 | 2 | import './settings'; 3 | import './api-fetch'; 4 | 5 | import './media-upload'; 6 | 7 | import './style.scss'; 8 | -------------------------------------------------------------------------------- /src/core/media-library.scss: -------------------------------------------------------------------------------- 1 | 2 | .media-library__popover { 3 | > div { 4 | padding: 1em; 5 | } 6 | 7 | .media-library__popover__content { 8 | max-height: 465px; 9 | display: grid; 10 | grid-template-columns: repeat(5, auto); 11 | grid-gap: 1em; 12 | 13 | .media-library-thumbnail { 14 | width: 100px; 15 | height: 100px; 16 | border: 1px solid #e2e4e7; 17 | padding: 5px; 18 | background-position: center; 19 | background-size: contain; 20 | background-repeat: no-repeat; 21 | background-color: hsla(240,5%,57%,.1); 22 | 23 | &:hover { 24 | cursor: pointer; 25 | box-shadow: inset 0 0 0 1px rgba(25,30,35,.2), 0 1px 3px rgba(25,30,35,.4); 26 | } 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/core/media-upload.js: -------------------------------------------------------------------------------- 1 | 2 | import { Component, Fragment } from 'react'; 3 | import './media-library.scss'; 4 | 5 | const { wp, lodash } = window; 6 | const { get } = lodash; 7 | 8 | const { __ } = wp.i18n; 9 | const { Popover } = wp.components; 10 | const { withSelect } = wp.data; 11 | const { addFilter } = wp.hooks; 12 | 13 | 14 | class MediaContainer extends Component { 15 | constructor (props) { 16 | super(props); 17 | this.onImageClick = this.onImageClick.bind(this); 18 | } 19 | 20 | onImageClick (img) { 21 | const { onSelect, closePopover, gallery = false, multiple = false } = this.props; 22 | 23 | const imgObject = { 24 | alt: img.alt_text, 25 | caption: img.caption.raw, 26 | id: img.id, 27 | link: img.link, 28 | mime: img.mime_type, 29 | sizes: img.media_details.sizes, 30 | media_details: img.media_details, 31 | subtype: img.mime_type.split('/')[ 1 ], 32 | type: img.mime_type.split('/')[ 0 ], 33 | url: img.source_url, 34 | data: img.data, 35 | }; 36 | 37 | if (gallery || multiple) { 38 | onSelect([imgObject]); 39 | } 40 | else { 41 | onSelect(imgObject); 42 | } 43 | closePopover(); 44 | } 45 | 46 | render () { 47 | const { media, allowedTypes = [] } = this.props; 48 | const items = media && media.filter(item => ! allowedTypes.length || allowedTypes.includes(item.media_type)); 49 | return ( 50 |
51 | { items && items.map(item => { 52 | const sourceUrl = get(item, 'media_details.sizes.thumbnail.source_url') || 53 | (item.media_type === 'image' && item.source_url); 54 | const buttonStyle = sourceUrl ? { backgroundImage: `url(${sourceUrl})` } : {}; 55 | 56 | return ; 62 | }) } 63 |
64 | ); 65 | } 66 | } 67 | 68 | 69 | const MediaLibrary = withSelect(select => ({ 70 | media: select('core').getMediaItems(), 71 | }))(MediaContainer); 72 | 73 | 74 | class MediaUpload extends Component { 75 | constructor (props) { 76 | super(props); 77 | this.state = { isVisible: false }; 78 | 79 | this.openPopover = this.openPopover.bind(this); 80 | this.closePopover = this.closePopover.bind(this); 81 | } 82 | 83 | openPopover () { 84 | this.setState({ isVisible: true }); 85 | } 86 | 87 | closePopover () { 88 | this.setState({ isVisible: false }); 89 | } 90 | 91 | render () { 92 | if (!this.props.mediaLibrary) { 93 | console.log('Media Library is deactivated'); 94 | return false; 95 | } 96 | 97 | const { isVisible } = this.state; 98 | 99 | return 100 | { isVisible && 101 | event.stopPropagation() } 105 | position="middle left" 106 | headerTitle={ __('Media Library') } 107 | > 108 | 112 | 113 | } 114 | { this.props.render({ open: this.openPopover }) } 115 | ; 116 | } 117 | } 118 | 119 | 120 | const replaceMediaUpload = () => withSelect(select => ({ 121 | mediaLibrary: select('core/editor').getEditorSettings().mediaLibrary, 122 | }))(MediaUpload); 123 | 124 | 125 | addFilter( 126 | 'editor.MediaUpload', 127 | 'core/edit-post/components/media-upload/replace-media-upload', 128 | replaceMediaUpload, 129 | ); 130 | -------------------------------------------------------------------------------- /src/core/settings.js: -------------------------------------------------------------------------------- 1 | 2 | // User settings 3 | window.userSettings = { 4 | secure: '', 5 | time: 1234567, 6 | uid: 1, 7 | }; 8 | 9 | // API settings 10 | window.wpApiSettings = { 11 | root: window.location.origin + '/', 12 | nonce: '123456789', 13 | versionString: 'wp/v2/', 14 | }; 15 | 16 | // postboxes 17 | window.postboxes = window.postboxes || { 18 | add_postbox_toggles: (page, args) => { 19 | console.log('page', page); 20 | console.log('args', args); 21 | }, 22 | }; 23 | -------------------------------------------------------------------------------- /src/data/categories.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "id": 2, 4 | "count": 3, 5 | "description": "Neque quibusdam nihil sequi quia et inventore dolorem dolores et consequuntur nostrum delectus esse cum et voluptatem ut rerum et accusamus quae vel neque laudantium optio rerum asperiores assumenda rerum qui eius neque dolores id quibusdam id optio ut eius dolor qui quas non", 6 | "link": "https://demo.wp-api.org/category/aut-architecto-nihil/", 7 | "name": "Aut architecto nihil", 8 | "slug": "aut-architecto-nihil", 9 | "taxonomy": "category", 10 | "parent": 0, 11 | "meta": [], 12 | "_links": { 13 | "self": [ 14 | { 15 | "href": "https://demo.wp-api.org/wp-json/wp/v2/categories/2" 16 | } 17 | ], 18 | "collection": [ 19 | { 20 | "href": "https://demo.wp-api.org/wp-json/wp/v2/categories" 21 | } 22 | ], 23 | "about": [ 24 | { 25 | "href": "https://demo.wp-api.org/wp-json/wp/v2/taxonomies/category" 26 | } 27 | ], 28 | "wp:post_type": [ 29 | { 30 | "href": "https://demo.wp-api.org/wp-json/wp/v2/posts?categories=2" 31 | } 32 | ], 33 | "curies": [ 34 | { 35 | "name": "wp", 36 | "href": "https://api.w.org/{rel}", 37 | "templated": true 38 | } 39 | ] 40 | } 41 | }, 42 | { 43 | "id": 11, 44 | "count": 7, 45 | "description": "Rem recusandae velit et incidunt labore qui explicabo veritatis eos quod dolor dolor occaecati nobis in suscipit et quo impedit repellat eius voluptatem", 46 | "link": "https://demo.wp-api.org/category/facilis-dignissimos/", 47 | "name": "Facilis dignissimos", 48 | "slug": "facilis-dignissimos", 49 | "taxonomy": "category", 50 | "parent": 0, 51 | "meta": [], 52 | "_links": { 53 | "self": [ 54 | { 55 | "href": "https://demo.wp-api.org/wp-json/wp/v2/categories/11" 56 | } 57 | ], 58 | "collection": [ 59 | { 60 | "href": "https://demo.wp-api.org/wp-json/wp/v2/categories" 61 | } 62 | ], 63 | "about": [ 64 | { 65 | "href": "https://demo.wp-api.org/wp-json/wp/v2/taxonomies/category" 66 | } 67 | ], 68 | "wp:post_type": [ 69 | { 70 | "href": "https://demo.wp-api.org/wp-json/wp/v2/posts?categories=11" 71 | } 72 | ], 73 | "curies": [ 74 | { 75 | "name": "wp", 76 | "href": "https://api.w.org/{rel}", 77 | "templated": true 78 | } 79 | ] 80 | } 81 | }, 82 | { 83 | "id": 1, 84 | "count": 5, 85 | "description": "", 86 | "link": "https://demo.wp-api.org/category/uncategorized/", 87 | "name": "Uncategorized", 88 | "slug": "uncategorized", 89 | "taxonomy": "category", 90 | "parent": 0, 91 | "meta": [], 92 | "_links": { 93 | "self": [ 94 | { 95 | "href": "https://demo.wp-api.org/wp-json/wp/v2/categories/1" 96 | } 97 | ], 98 | "collection": [ 99 | { 100 | "href": "https://demo.wp-api.org/wp-json/wp/v2/categories" 101 | } 102 | ], 103 | "about": [ 104 | { 105 | "href": "https://demo.wp-api.org/wp-json/wp/v2/taxonomies/category" 106 | } 107 | ], 108 | "wp:post_type": [ 109 | { 110 | "href": "https://demo.wp-api.org/wp-json/wp/v2/posts?categories=1" 111 | } 112 | ], 113 | "curies": [ 114 | { 115 | "name": "wp", 116 | "href": "https://api.w.org/{rel}", 117 | "templated": true 118 | } 119 | ] 120 | } 121 | } 122 | ] 123 | -------------------------------------------------------------------------------- /src/data/taxonomies.json: -------------------------------------------------------------------------------- 1 | { 2 | "category": { 3 | "name": "Categories", 4 | "slug": "category", 5 | "description": "", 6 | "types": [ 7 | "post" 8 | ], 9 | "visibility": { "show_ui": false }, 10 | "hierarchical": true, 11 | "rest_base": "categories", 12 | "_links": { 13 | "collection": [ 14 | { 15 | "href": "https://demo.wp-api.org/wp-json/wp/v2/taxonomies" 16 | } 17 | ], 18 | "wp:items": [ 19 | { 20 | "href": "https://demo.wp-api.org/wp-json/wp/v2/categories" 21 | } 22 | ], 23 | "curies": [ 24 | { 25 | "name": "wp", 26 | "href": "https://api.w.org/{rel}", 27 | "templated": true 28 | } 29 | ] 30 | }, 31 | "labels": { 32 | "singular_name": "Category" 33 | } 34 | }, 35 | "post_tag": { 36 | "name": "Tags", 37 | "slug": "post_tag", 38 | "description": "", 39 | "types": [ 40 | "post" 41 | ], 42 | "visibility": { "show_ui": false }, 43 | "hierarchical": false, 44 | "rest_base": "tags", 45 | "_links": { 46 | "collection": [ 47 | { 48 | "href": "https://demo.wp-api.org/wp-json/wp/v2/taxonomies" 49 | } 50 | ], 51 | "wp:items": [ 52 | { 53 | "href": "https://demo.wp-api.org/wp-json/wp/v2/tags" 54 | } 55 | ], 56 | "curies": [ 57 | { 58 | "name": "wp", 59 | "href": "https://api.w.org/{rel}", 60 | "templated": true 61 | } 62 | ] 63 | }, 64 | "labels": { 65 | "singular_name": "Tag" 66 | } 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /src/data/themes.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "theme_supports": { 4 | "formats": [ 5 | "standard", 6 | "aside", 7 | "image", 8 | "video", 9 | "quote", 10 | "link", 11 | "gallery", 12 | "audio" 13 | ], 14 | "post-thumbnails": true, 15 | "responsive-embeds": false 16 | } 17 | } 18 | ] 19 | -------------------------------------------------------------------------------- /src/data/types.json: -------------------------------------------------------------------------------- 1 | { 2 | "post": { 3 | "description": "", 4 | "hierarchical": false, 5 | "viewable": true, 6 | "name": "Posts", 7 | "slug": "post", 8 | "supports": { 9 | "author": false, 10 | "comments": false, 11 | "custom-fields": true, 12 | "editor": true, 13 | "excerpt": false, 14 | "page-attributes": false, 15 | "revisions": false, 16 | "thumbnail": false, 17 | "title": true, 18 | "post-formats": true 19 | }, 20 | "taxonomies": [ 21 | "category", 22 | "post_tag" 23 | ], 24 | "rest_base": "posts", 25 | "_links": { 26 | "collection": [ 27 | { 28 | "href": "https://demo.wp-api.org/wp-json/wp/v2/types" 29 | } 30 | ], 31 | "wp:items": [ 32 | { 33 | "href": "https://demo.wp-api.org/wp-json/wp/v2/posts" 34 | } 35 | ], 36 | "curies": [ 37 | { 38 | "name": "wp", 39 | "href": "https://api.w.org/{rel}", 40 | "templated": true 41 | } 42 | ] 43 | }, 44 | "labels": { 45 | "singular_name": "Post" 46 | } 47 | }, 48 | "page": { 49 | "description": "", 50 | "hierarchical": true, 51 | "viewable": true, 52 | "name": "Pages", 53 | "slug": "page", 54 | "supports": { 55 | "author": false, 56 | "comments": false, 57 | "custom-fields": false, 58 | "discussion": false, 59 | "editor": true, 60 | "excerpt": true, 61 | "page-attributes": false, 62 | "revisions": false, 63 | "thumbnail": false, 64 | "title": false 65 | }, 66 | "taxonomies": [], 67 | "rest_base": "pages", 68 | "_links": { 69 | "collection": [ 70 | { 71 | "href": "https://demo.wp-api.org/wp-json/wp/v2/types" 72 | } 73 | ], 74 | "wp:items": [ 75 | { 76 | "href": "https://demo.wp-api.org/wp-json/wp/v2/pages" 77 | } 78 | ], 79 | "curies": [ 80 | { 81 | "name": "wp", 82 | "href": "https://api.w.org/{rel}", 83 | "templated": true 84 | } 85 | ] 86 | }, 87 | "labels": { 88 | "singular_name": "Page" 89 | } 90 | }, 91 | "attachment": { 92 | "description": "", 93 | "hierarchical": false, 94 | "viewable": true, 95 | "name": "Media", 96 | "slug": "attachment", 97 | "supports": { 98 | "title": true, 99 | "author": true, 100 | "comments": true 101 | }, 102 | "taxonomies": [], 103 | "rest_base": "media", 104 | "_links": { 105 | "collection": [ 106 | { 107 | "href": "https://demo.wp-api.org/wp-json/wp/v2/types" 108 | } 109 | ], 110 | "wp:items": [ 111 | { 112 | "href": "https://demo.wp-api.org/wp-json/wp/v2/media" 113 | } 114 | ], 115 | "curies": [ 116 | { 117 | "name": "wp", 118 | "href": "https://api.w.org/{rel}", 119 | "templated": true 120 | } 121 | ] 122 | }, 123 | "labels": { 124 | "singular_name": "Media" 125 | } 126 | }, 127 | "wp_block": { 128 | "description": "", 129 | "hierarchical": false, 130 | "viewable": false, 131 | "name": "Blocks", 132 | "slug": "wp_block", 133 | "supports": { 134 | "title": true, 135 | "editor": true 136 | }, 137 | "taxonomies": [], 138 | "rest_base": "blocks", 139 | "_links": { 140 | "collection": [ 141 | { 142 | "href": "https://demo.wp-api.org/wp-json/wp/v2/types" 143 | } 144 | ], 145 | "wp:items": [ 146 | { 147 | "href": "https://demo.wp-api.org/wp-json/wp/v2/blocks" 148 | } 149 | ], 150 | "curies": [ 151 | { 152 | "name": "wp", 153 | "href": "https://api.w.org/{rel}", 154 | "templated": true 155 | } 156 | ] 157 | }, 158 | "headers": [], 159 | "labels": { 160 | "singular_name": "Block" 161 | } 162 | } 163 | } 164 | -------------------------------------------------------------------------------- /src/data/users.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "id": 1, 4 | "name": "Human Made", 5 | "url": "", 6 | "description": "", 7 | "link": "https://demo.wp-api.org/author/humanmade/", 8 | "slug": "humanmade", 9 | "avatar_urls": { 10 | "24": "https://secure.gravatar.com/avatar/83888eb8aea456e4322577f96b4dbaab?s=24&d=mm&r=g", 11 | "48": "https://secure.gravatar.com/avatar/83888eb8aea456e4322577f96b4dbaab?s=48&d=mm&r=g", 12 | "96": "https://secure.gravatar.com/avatar/83888eb8aea456e4322577f96b4dbaab?s=96&d=mm&r=g" 13 | }, 14 | "meta": [], 15 | "_links": { 16 | "self": [ 17 | { 18 | "href": "https://demo.wp-api.org/wp-json/wp/v2/users/1" 19 | } 20 | ], 21 | "collection": [ 22 | { 23 | "href": "https://demo.wp-api.org/wp-json/wp/v2/users" 24 | } 25 | ] 26 | } 27 | } 28 | ] 29 | -------------------------------------------------------------------------------- /src/globals/api-fetch.js: -------------------------------------------------------------------------------- 1 | 2 | import routes from './api-routes'; 3 | 4 | 5 | function matchRoute (pattern, pathname) { 6 | const res = {}; 7 | const r = pattern.split('/'), p = pathname.split('/'); 8 | const l = Math.max(r.length, p.length); 9 | 10 | let i = 0; 11 | for(; i < l; i++) { 12 | if(r[i] === p[i]) { 13 | continue; 14 | } 15 | if(!r[i] || !p[i]) { 16 | return false; 17 | } 18 | if(r[i].charAt(0) === '{' && r[i].charAt(r[i].length - 1) === '}') { 19 | const param = r[i].slice(1, -1); 20 | if(param.includes('*')) { 21 | res[param.replace('*', '')] = p.slice(i).join('/'); 22 | return res; 23 | } 24 | res[param] = p[i]; 25 | continue; 26 | } 27 | return false; 28 | } 29 | return res; 30 | } 31 | 32 | function matchRouteList (options, pathname) { 33 | if(typeof options === 'string') { 34 | return matchRoute(options, pathname); 35 | } 36 | 37 | for(const pattern of options) { 38 | const params = matchRoute(pattern, pathname); 39 | if(params) { 40 | return params; 41 | } 42 | } 43 | return false; 44 | } 45 | 46 | function matchMethod (source, target) { 47 | return !target || target === '*' || target === source || target.includes(source); 48 | } 49 | 50 | function parseQS (qs) { 51 | return qs.split('&').reduce((a, i, p) => { 52 | p = i.split('='); 53 | a[decodeURIComponent(p[0])] = decodeURIComponent(p[1] || ''); 54 | return a; 55 | }, {}); 56 | } 57 | 58 | 59 | const apiFetch = options => { 60 | let { method = 'GET' } = options; 61 | const { path, data, body, url, headers } = options; 62 | const [ pathname, _qs ] = path.split('?'); 63 | const query = parseQS(_qs); 64 | const payload = data || body; 65 | 66 | if(headers && headers['X-HTTP-Method-Override']) { 67 | method = headers['X-HTTP-Method-Override']; 68 | } 69 | 70 | // console.log(method, pathname); 71 | 72 | for(const r of routes) { 73 | const params = matchRouteList(r.path, pathname); 74 | if(params) { 75 | if(matchMethod(method, r.method)) { 76 | return r.handler({ 77 | method, url, pathname, params, query, payload, 78 | }); 79 | } 80 | } 81 | } 82 | 83 | console.error('Unmatched route:', method, path, payload); 84 | return {}; 85 | }; 86 | 87 | export default apiFetch; 88 | -------------------------------------------------------------------------------- /src/globals/api-routes.js: -------------------------------------------------------------------------------- 1 | 2 | import { getPage, savePage, deletePage } from './fake-data.js'; 3 | import { mediaList, createMedia } from './fake-media.js'; 4 | import { getEmbed } from './embeds.js'; 5 | 6 | import users from '../data/users'; 7 | import taxonomies from '../data/taxonomies'; 8 | import categories from '../data/categories'; 9 | import types from '../data/types'; 10 | import themes from '../data/themes'; 11 | 12 | 13 | export default [ 14 | // Pages and posts 15 | { 16 | path: '/wp/v2/pages', 17 | method: '*', 18 | handler () { 19 | return [ getPage() ]; 20 | }, 21 | }, 22 | { 23 | path: [ 24 | '/wp/v2/pages/{id}', 25 | '/wp/v2/pages/{id}/autosaves', 26 | ], 27 | method: ['POST', 'PUT'], 28 | handler ({ payload }) { 29 | savePage(payload); 30 | return getPage(); 31 | }, 32 | }, 33 | { 34 | path: '/wp/v2/pages/{id}', 35 | method: 'DELETE', 36 | handler () { 37 | deletePage(); 38 | return {}; 39 | }, 40 | }, 41 | { 42 | path: [ 43 | '/wp/v2/pages/{id}', 44 | '/wp/v2/pages/{id}/autosaves', 45 | ], 46 | method: '*', 47 | handler () { 48 | return getPage(); 49 | }, 50 | }, 51 | 52 | { 53 | path: '/wp/v2/posts', 54 | method: '*', 55 | handler () { 56 | return [ getPage('post') ]; 57 | }, 58 | }, 59 | { 60 | path: '/wp/v2/posts/{id}', 61 | method: 'DELETE', 62 | handler () { 63 | deletePage(); 64 | return {}; 65 | }, 66 | }, 67 | { 68 | path: [ 69 | '/wp/v2/posts/{id}', 70 | '/wp/v2/posts/{id}/autosaves', 71 | ], 72 | method: ['POST', 'PUT'], 73 | handler ({ payload }) { 74 | savePage(payload); 75 | return getPage('post'); 76 | }, 77 | }, 78 | { 79 | path: [ 80 | '/wp/v2/posts/{id}', 81 | '/wp/v2/posts/{id}/autosaves', 82 | ], 83 | method: '*', 84 | handler () { 85 | return getPage('post'); 86 | }, 87 | }, 88 | 89 | // Media 90 | { 91 | path: '/wp/v2/media', 92 | method: 'OPTIONS', 93 | handler () { 94 | return { 95 | headers: { 96 | get (value) { 97 | if (value === 'allow') { return [ 'POST' ]; } 98 | }, 99 | }, 100 | }; 101 | }, 102 | }, 103 | { 104 | path: '/wp/v2/media', 105 | method: 'POST', 106 | async handler ({ payload }) { 107 | const file = payload.get('file'); 108 | return file ? await createMedia(file) : {}; 109 | }, 110 | }, 111 | { 112 | path: '/wp/v2/media', 113 | method: '*', 114 | handler () { 115 | return mediaList; 116 | }, 117 | }, 118 | { 119 | path: '/wp/v2/media/{id}', 120 | method: '*', 121 | handler ({ params }) { 122 | return mediaList[+params.id - 1]; 123 | }, 124 | }, 125 | 126 | 127 | // Types 128 | { 129 | path: '/wp/v2/types', 130 | method: '*', 131 | handler () { 132 | return types; 133 | }, 134 | }, 135 | { 136 | path: '/wp/v2/types/{type}', 137 | method: '*', 138 | handler ({ params }) { 139 | return types[params.type] || {}; 140 | }, 141 | }, 142 | 143 | // Blocks 144 | { 145 | path: '/wp/v2/blocks', 146 | method: '*', 147 | handler () { 148 | return []; 149 | }, 150 | }, 151 | 152 | // Themes 153 | { 154 | path: '/wp/v2/themes', 155 | method: '*', 156 | handler () { 157 | return themes; 158 | }, 159 | }, 160 | 161 | // Taxonomies 162 | { 163 | path: '/wp/v2/taxonomies', 164 | method: '*', 165 | handler () { 166 | return new window.Response(JSON.stringify(taxonomies)); 167 | }, 168 | }, 169 | { 170 | path: '/wp/v2/taxonomies/{type}', 171 | method: '*', 172 | handler ({ params }) { 173 | return taxonomies[params.type] || {}; 174 | }, 175 | }, 176 | 177 | // Categories 178 | { 179 | path: '/wp/v2/categories', 180 | method: '*', 181 | handler () { 182 | return categories; 183 | }, 184 | }, 185 | 186 | // Users 187 | { 188 | path: '/wp/v2/users/', 189 | method: '*', 190 | handler () { 191 | return new window.Response(JSON.stringify(users)); 192 | }, 193 | }, 194 | { 195 | path: '/wp/v2/users/{name}', 196 | method: '*', 197 | handler () { 198 | return users[0] || {}; 199 | }, 200 | }, 201 | 202 | // Block renderer 203 | { 204 | path: '/wp/v2/block-renderer/{block*}', 205 | method: '*', 206 | handler ({ params }) { 207 | return { 208 | rendered: `
Sorry. There is no server-side rendering available for "${params.block}".
`, 209 | }; 210 | }, 211 | }, 212 | 213 | // Search 214 | { 215 | path: '/wp/v2/search', 216 | method: '*', 217 | handler () { 218 | return []; 219 | }, 220 | }, 221 | 222 | // Embed 223 | { 224 | path: '/oembed/1.0/proxy', 225 | method: '*', 226 | handler ({ query }) { 227 | return getEmbed(query.url); 228 | }, 229 | }, 230 | ]; 231 | -------------------------------------------------------------------------------- /src/globals/embeds.js: -------------------------------------------------------------------------------- 1 | import providers from 'oembed-providers'; 2 | 3 | export async function getEmbed (url) { 4 | // Proxy that we use that enables cross-origin requests 5 | // https://cors-anywhere.herokuapp.com/ 6 | const cors_api_host = 'https://cors-anywhere.herokuapp.com/'; 7 | const hostname = (new URL(url)).hostname; 8 | 9 | // Find the provider 10 | const provider = providers.find(({ provider_url }) => { 11 | return provider_url.includes(hostname) || hostname.includes(provider_url); 12 | }); 13 | 14 | if(provider && provider.endpoints) { 15 | // Use the first endpoint 16 | const provider_url = provider.endpoints[0].url; 17 | 18 | // Fetch embed to provider through the proxy 19 | const response = await fetch(`${cors_api_host}${provider_url}?url=${url}`); 20 | return response.json(); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/globals/fake-data.js: -------------------------------------------------------------------------------- 1 | const date = (new Date()).toISOString(); 2 | 3 | export const pages = { 4 | page: { 5 | id: 1, 6 | content: { 7 | raw: '', 8 | rendered: '', 9 | }, 10 | date, 11 | date_gmt: date, 12 | title: { 13 | raw: 'Preview page', 14 | rendered: 'Preview page', 15 | }, 16 | excerpt: { 17 | raw: '', 18 | rendered: '', 19 | }, 20 | status: 'draft', 21 | revisions: { count: 0, last_id: 0 }, 22 | parent: 0, 23 | theme_style: true, 24 | type: 'page', 25 | link: `${window.location.origin}/preview`, 26 | categories: [ ], 27 | featured_media: 0, 28 | permalink_template: `${window.location.origin}/preview`, 29 | preview_link: `${window.location.origin}/preview`, 30 | _links: { 31 | 'wp:action-assign-categories': [], 32 | 'wp:action-create-categories': [], 33 | }, 34 | }, 35 | post: { 36 | id: 1, 37 | content: { 38 | raw: '', 39 | rendered: '', 40 | }, 41 | date, 42 | date_gmt: date, 43 | title: { 44 | raw: 'Preview post', 45 | rendered: 'Preview post', 46 | }, 47 | excerpt: { 48 | raw: '', 49 | rendered: '', 50 | }, 51 | status: 'draft', 52 | revisions: { count: 0, last_id: 0 }, 53 | parent: 0, 54 | theme_style: true, 55 | type: 'post', 56 | link: `${window.location.origin}/preview`, 57 | categories: [ ], 58 | featured_media: 0, 59 | permalink_template: `${window.location.origin}/preview`, 60 | preview_link: `${window.location.origin}/preview`, 61 | _links: { 62 | 'wp:action-assign-categories': [], 63 | 'wp:action-create-categories': [], 64 | }, 65 | }, 66 | }; 67 | 68 | 69 | export function getPage (type = 'page') { 70 | return JSON.parse(localStorage.getItem('g-editor-page')) || pages[type]; 71 | } 72 | 73 | export function savePage (data, type = 'page') { 74 | const item = { 75 | ...getPage(type), 76 | id: data.id || 1, // to prevent when id isn't passed as data (ex: autosaves) 77 | }; 78 | 79 | if(data.title) { 80 | item.title = { 81 | raw: data.title, 82 | rendered: data.title, 83 | }; 84 | } 85 | if(data.content) { 86 | item.content = { 87 | raw: data.content, 88 | // rendered: data.content.replace(/()/g, ''), 89 | }; 90 | } 91 | if(data.excerpt) { 92 | item.excerpt = { 93 | raw: data.excerpt, 94 | rendered: data.excerpt, 95 | }; 96 | } 97 | 98 | localStorage.setItem('g-editor-page', JSON.stringify(item)); 99 | } 100 | 101 | export function changeType (type) { 102 | const item = getPage(type); 103 | item.type = type; 104 | 105 | localStorage.setItem('g-editor-page', JSON.stringify(item)); 106 | } 107 | 108 | export function deletePage () { 109 | // Workaround to wait until the POST request (that is called after DELETE) 110 | // is finished. 111 | setTimeout(function () { 112 | localStorage.removeItem('g-editor-page'); 113 | sessionStorage.removeItem('wp-autosave-block-editor-post-1'); 114 | window.location.reload(); 115 | }, 500); 116 | } 117 | -------------------------------------------------------------------------------- /src/globals/fake-media.js: -------------------------------------------------------------------------------- 1 | const date = (new Date()).toISOString(); 2 | const origin = window.location.origin; 3 | 4 | // List of images 5 | export const mediaList = []; 6 | 7 | export function getMedia (id, params = {}) { 8 | const sizes = {}; 9 | if (params.thumbnail) { 10 | sizes.thumbnail = { 11 | source_url: params.thumbnail, 12 | }; 13 | } 14 | 15 | return { 16 | id, 17 | title: { raw: '', rendered: '' }, 18 | caption: { raw: '', rendered: '' }, 19 | date_gmt: date, 20 | date, 21 | media_type: params.media_type, 22 | mime_type: params.mime_type, 23 | source_url: params.source_url, 24 | // link: params.source_url, 25 | media_details: { 26 | file: '', 27 | width: 0, 28 | height: 0, 29 | image_meta: {}, 30 | sizes, 31 | }, 32 | }; 33 | } 34 | 35 | export function createMedia (file) { 36 | return new Promise(resolve => { 37 | const reader = new window.FileReader(); 38 | reader.onload = () => { 39 | // Create media and add to list 40 | const img = getMedia(mediaList.length + 1, { 41 | media_type: file.type.split('/')[0], 42 | mime_type: file.type, 43 | source_url: reader.result, 44 | }); 45 | mediaList.push(img); 46 | resolve(img); 47 | }; 48 | reader.readAsDataURL(file); 49 | }); 50 | } 51 | 52 | 53 | // Load media (images) 54 | mediaList.push(getMedia(1, { 55 | media_type: 'image', 56 | mime_type: 'image/jpeg', 57 | source_url: `${origin}/media/img1.jpg`, 58 | })); 59 | 60 | mediaList.push(getMedia(2, { 61 | media_type: 'image', 62 | mime_type: 'image/jpeg', 63 | source_url: `${origin}/media/img2.jpeg`, 64 | })); 65 | 66 | mediaList.push(getMedia(3, { 67 | media_type: 'image', 68 | mime_type: 'image/png', 69 | source_url: `${origin}/media/img3.png`, 70 | })); 71 | 72 | 73 | // Load media (videos) 74 | mediaList.push(getMedia(4, { 75 | media_type: 'video', 76 | mime_type: 'video/mp4', 77 | source_url: `${origin}/media/video1.mp4`, 78 | thumbnail: `${origin}/media/video1-thumb.jpg`, 79 | })); 80 | 81 | mediaList.push(getMedia(5, { 82 | media_type: 'video', 83 | mime_type: 'video/mp4', 84 | source_url: `${origin}/media/video2.mp4`, 85 | thumbnail: `${origin}/media/video2-thumb.jpg`, 86 | })); 87 | 88 | 89 | // Load media (audios) 90 | mediaList.push(getMedia(6, { 91 | media_type: 'audio', 92 | mime_type: 'audio/mp3', 93 | source_url: `${origin}/media/audio1.mp3`, 94 | thumbnail: `${origin}/media/audio1-thumb.png`, 95 | })); 96 | -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import { BrowserRouter, Switch, Route } from 'react-router-dom'; 4 | 5 | import './core'; 6 | 7 | import Editor from './pages/editor'; 8 | import Preview from './pages/preview'; 9 | 10 | ReactDOM.render(( 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | ), document.getElementById('root')); 20 | -------------------------------------------------------------------------------- /src/pages/editor.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import types from '../data/types'; 3 | import { changeType } from '../globals/fake-data'; 4 | 5 | import './editor.scss'; 6 | 7 | const { data, editPost, domReady } = window.wp; 8 | 9 | 10 | class Editor extends React.Component { 11 | constructor (props) { 12 | super(props); 13 | 14 | let type = window.location.pathname.replace(/\//g, ''); 15 | type = type.slice(0, -1); 16 | 17 | this.state = { 18 | postType: type || 'page', 19 | }; 20 | } 21 | 22 | componentDidMount () { 23 | const { postType } = this.state; 24 | 25 | const settings = { 26 | alignWide: true, 27 | availableTemplates: [], 28 | allowedBlockTypes: true, 29 | disableCustomColors: false, 30 | disableCustomFontSizes: false, 31 | disablePostFormats: false, 32 | titlePlaceholder: 'Add title', 33 | bodyPlaceholder: 'Insert your custom block', 34 | isRTL: false, 35 | autosaveInterval: 3, 36 | style: [], 37 | imageSizes: [], 38 | richEditingEnabled: true, 39 | postLock: { 40 | isLocked: false, 41 | }, 42 | postLockUtils: { 43 | nonce: '123456789', 44 | }, 45 | enableCustomFields: true, 46 | mediaLibrary: true, 47 | __experimentalBlockPatterns: [], 48 | __experimentalBlockPatternCategories: [], 49 | __experimentalDisableCustomLineHeight: [], 50 | __experimentalDisableCustomUnits: [], 51 | __experimentalEnableLinkColor: [], 52 | }; 53 | 54 | // Disable publish sidebar 55 | data.dispatch('core/editor').disablePublishSidebar(); 56 | 57 | // Disable tips 58 | data.dispatch('core/nux').disableTips(); 59 | 60 | // Initialize the editor 61 | window._wpLoadBlockEditor = new Promise(resolve => { 62 | domReady(() => { 63 | resolve(editPost.initializeEditor('editor', postType, 1, settings, {})); 64 | }); 65 | }); 66 | } 67 | 68 | resetLocalStorage = ev => { 69 | ev.preventDefault(); 70 | 71 | localStorage.removeItem('g-editor-page'); 72 | sessionStorage.removeItem('wp-autosave-block-editor-post-1'); 73 | window.location.reload(); 74 | }; 75 | 76 | changePostType = (ev, type) => { 77 | ev.preventDefault(); 78 | // update postType in localStorage before reload the editor 79 | const slug = type.slice(0, -1); 80 | changeType(slug); 81 | 82 | window.location.replace(type); 83 | }; 84 | 85 | render () { 86 | const { postType } = this.state; 87 | 88 | return ( 89 | 90 |
91 | { 92 | ['post', 'page'].map(type => { 93 | return ( 94 | 99 | ); 100 | }) 101 | } 102 | 103 | 105 |
106 |
107 |
108 | ); 109 | } 110 | } 111 | 112 | export default Editor; 113 | -------------------------------------------------------------------------------- /src/pages/editor.scss: -------------------------------------------------------------------------------- 1 | 2 | .editor-nav { 3 | position: absolute; 4 | display: flex; 5 | justify-content: center; 6 | align-items: center; 7 | width: 100%; 8 | height: 56px; 9 | 10 | * { 11 | z-index: 99; 12 | } 13 | } 14 | 15 | // TODO: move to core style. 16 | @media (min-width: 782px) { 17 | .edit-post-layout__content { 18 | margin-left: 0 !important; 19 | } 20 | } 21 | 22 | iframe { 23 | border: none; 24 | } 25 | -------------------------------------------------------------------------------- /src/pages/preview.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { getPage } from '../globals/fake-data'; 3 | 4 | const { domReady } = window.wp; 5 | 6 | 7 | class Preview extends React.Component { 8 | constructor (props) { 9 | super(props); 10 | 11 | this.state = { 12 | rendered: '', 13 | }; 14 | } 15 | 16 | componentWillMount () { 17 | // remove block editor style from page 18 | const editorStyle = document.querySelector('style[id="block-editor-style"]'); 19 | if (editorStyle) { 20 | editorStyle.remove(); 21 | } 22 | 23 | // remove editor style 24 | const style = document.querySelector('link[href$="css/gutenberg/style.css"]'); 25 | if (style) { 26 | style.remove(); 27 | } 28 | } 29 | 30 | componentDidMount () { 31 | const page = getPage(); 32 | const rendered = ( 33 | page && page.content && page.content.raw && 34 | page.content.raw.replace(/()/g, '') 35 | ) || ''; 36 | 37 | this.setState({ 38 | rendered, 39 | }); 40 | 41 | domReady(() => { 42 | // Load the frontend scripts 43 | const code = document.getElementById('frontend-scripts'); 44 | if (code && code.innerText) { 45 | const script = document.createElement('script'); 46 | script.type = 'text/javascript'; 47 | script.async = true; 48 | script.src = `data:text/javascript;base64,${code.innerText}`; 49 | document.body.appendChild(script); 50 | } 51 | 52 | // Load html blocks scripts 53 | const html = rendered.trim(); 54 | const container = document.createElement('div'); 55 | container.innerHTML = html; 56 | 57 | const scripts = container.getElementsByTagName('script'); 58 | for(const s of scripts) { 59 | const script = document.createElement('script'); 60 | script.type = 'text/javascript'; 61 | script.async = true; 62 | 63 | if (s.innerText) { 64 | // inner script 65 | const frontendScript = Buffer.from(s.innerText).toString('base64'); 66 | script.src = `data:text/javascript;base64,${frontendScript}`; 67 | } 68 | else { 69 | // or from external src 70 | script.src = s.src; 71 | } 72 | 73 | document.body.appendChild(script); 74 | } 75 | }); 76 | } 77 | 78 | render () { 79 | const { rendered } = this.state; 80 | return rendered ? 81 |
: 82 |
Add your custom block in the editor
; 83 | } 84 | } 85 | 86 | export default Preview; 87 | -------------------------------------------------------------------------------- /src/serviceWorker.js: -------------------------------------------------------------------------------- 1 | // This optional code is used to register a service worker. 2 | // register() is not called by default. 3 | 4 | // This lets the app load faster on subsequent visits in production, and gives 5 | // it offline capabilities. However, it also means that developers (and users) 6 | // will only see deployed updates on subsequent visits to a page, after all the 7 | // existing tabs open on the page have been closed, since previously cached 8 | // resources are updated in the background. 9 | 10 | // To learn more about the benefits of this model and instructions on how to 11 | // opt-in, read http://bit.ly/CRA-PWA. 12 | 13 | const isLocalhost = Boolean( 14 | window.location.hostname === 'localhost' || 15 | // [::1] is the IPv6 localhost address. 16 | window.location.hostname === '[::1]' || 17 | // 127.0.0.1/8 is considered localhost for IPv4. 18 | window.location.hostname.match( 19 | /^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/ 20 | ) 21 | ); 22 | 23 | export function register (config) { 24 | if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) { 25 | // The URL constructor is available in all browsers that support SW. 26 | const publicUrl = new URL(process.env.PUBLIC_URL, window.location); 27 | if (publicUrl.origin !== window.location.origin) { 28 | // Our service worker won't work if PUBLIC_URL is on a different origin 29 | // from what our page is served on. This might happen if a CDN is used to 30 | // serve assets; see https://github.com/facebook/create-react-app/issues/2374 31 | return; 32 | } 33 | 34 | window.addEventListener('load', () => { 35 | const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`; 36 | 37 | if (isLocalhost) { 38 | // This is running on localhost. Let's check if a service worker still exists or not. 39 | checkValidServiceWorker(swUrl, config); 40 | 41 | // Add some additional logging to localhost, pointing developers to the 42 | // service worker/PWA documentation. 43 | navigator.serviceWorker.ready.then(() => { 44 | console.log( 45 | 'This web app is being served cache-first by a service ' + 46 | 'worker. To learn more, visit http://bit.ly/CRA-PWA' 47 | ); 48 | }); 49 | } 50 | else { 51 | // Is not localhost. Just register service worker 52 | registerValidSW(swUrl, config); 53 | } 54 | }); 55 | } 56 | } 57 | 58 | function registerValidSW (swUrl, config) { 59 | navigator.serviceWorker 60 | .register(swUrl) 61 | .then(registration => { 62 | registration.onupdatefound = () => { 63 | const installingWorker = registration.installing; 64 | installingWorker.onstatechange = () => { 65 | if (installingWorker.state === 'installed') { 66 | if (navigator.serviceWorker.controller) { 67 | // At this point, the updated precached content has been fetched, 68 | // but the previous service worker will still serve the older 69 | // content until all client tabs are closed. 70 | console.log( 71 | 'New content is available and will be used when all ' + 72 | 'tabs for this page are closed. See http://bit.ly/CRA-PWA.' 73 | ); 74 | 75 | // Execute callback 76 | if (config && config.onUpdate) { 77 | config.onUpdate(registration); 78 | } 79 | } 80 | else { 81 | // At this point, everything has been precached. 82 | // It's the perfect time to display a 83 | // "Content is cached for offline use." message. 84 | console.log('Content is cached for offline use.'); 85 | 86 | // Execute callback 87 | if (config && config.onSuccess) { 88 | config.onSuccess(registration); 89 | } 90 | } 91 | } 92 | }; 93 | }; 94 | }) 95 | .catch(error => { 96 | console.error('Error during service worker registration:', error); 97 | }); 98 | } 99 | 100 | function checkValidServiceWorker (swUrl, config) { 101 | // Check if the service worker can be found. If it can't reload the page. 102 | fetch(swUrl) 103 | .then(response => { 104 | // Ensure service worker exists, and that we really are getting a JS file. 105 | if ( 106 | response.status === 404 || 107 | response.headers.get('content-type').indexOf('javascript') === -1 108 | ) { 109 | // No service worker found. Probably a different app. Reload the page. 110 | navigator.serviceWorker.ready.then(registration => { 111 | registration.unregister().then(() => { 112 | window.location.reload(); 113 | }); 114 | }); 115 | } 116 | else { 117 | // Service worker found. Proceed as normal. 118 | registerValidSW(swUrl, config); 119 | } 120 | }) 121 | .catch(() => { 122 | console.log( 123 | 'No internet connection found. App is running in offline mode.' 124 | ); 125 | }); 126 | } 127 | 128 | export function unregister () { 129 | if ('serviceWorker' in navigator) { 130 | navigator.serviceWorker.ready.then(registration => { 131 | registration.unregister(); 132 | }); 133 | } 134 | } 135 | --------------------------------------------------------------------------------