diff --git a/package-lock.json b/package-lock.json index 4b4ebd795..51dc61bf7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,6 @@ "version": "0.0.0", "license": "GPL-2.0-or-later", "workspaces": [ - "public_html/wp-content/plugins/pattern-creator", "public_html/wp-content/plugins/pattern-directory", "public_html/wp-content/themes/wporg-pattern-directory-2024" ], @@ -6526,35 +6525,6 @@ "react": "^18.0.0" } }, - "node_modules/@wordpress/format-library": { - "version": "5.14.0", - "resolved": "https://registry.npmjs.org/@wordpress/format-library/-/format-library-5.14.0.tgz", - "integrity": "sha512-ds281vAoGkxpgADnuPnbIWgvNlnj47NOD0k+8Uxpvqbfym3KXVWAsKvn51FuCSdU8WGai0LvO3yP/88ms9YNKg==", - "license": "GPL-2.0-or-later", - "dependencies": { - "@babel/runtime": "7.25.7", - "@wordpress/a11y": "*", - "@wordpress/block-editor": "*", - "@wordpress/components": "*", - "@wordpress/compose": "*", - "@wordpress/data": "*", - "@wordpress/element": "*", - "@wordpress/html-entities": "*", - "@wordpress/i18n": "*", - "@wordpress/icons": "*", - "@wordpress/private-apis": "*", - "@wordpress/rich-text": "*", - "@wordpress/url": "*" - }, - "engines": { - "node": ">=18.12.0", - "npm": ">=8.19.2" - }, - "peerDependencies": { - "react": "^18.0.0", - "react-dom": "^18.0.0" - } - }, "node_modules/@wordpress/hooks": { "version": "4.14.0", "resolved": "https://registry.npmjs.org/@wordpress/hooks/-/hooks-4.14.0.tgz", @@ -8927,12 +8897,6 @@ "integrity": "sha512-cuSVIHi9/9E/+821Qjdvngor+xpnlwnuwIyZOaLmHBVdXL+gP+I6QQB9VkO7RI77YIcTV+S1W9AreJ5eN63JBA==", "license": "MIT" }, - "node_modules/classnames": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.5.1.tgz", - "integrity": "sha512-saHYOzhIQs6wy2sVxTM6bUDsQO4F50V9RQ22qBpEdCW+I+/Wmke2HOl6lS6dTpdxVhb88/I6+Hs+438c3lfUow==", - "license": "MIT" - }, "node_modules/clean-webpack-plugin": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/clean-webpack-plugin/-/clean-webpack-plugin-3.0.0.tgz", @@ -10057,13 +10021,6 @@ "node": ">=4.0.0" } }, - "node_modules/deep-freeze": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/deep-freeze/-/deep-freeze-0.0.1.tgz", - "integrity": "sha512-Z+z8HiAvsGwmjqlphnHW5oz6yWlOwu6EQfFTjmeTWlDeda3FS2yv3jhq35TX/ewmsnqB+RX2IdsIOyjJCQN5tg==", - "dev": true, - "license": "public domain" - }, "node_modules/deep-is": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", @@ -17429,102 +17386,6 @@ "postcss": "^8.4.31" } }, - "node_modules/postcss-custom-properties": { - "version": "13.3.4", - "resolved": "https://registry.npmjs.org/postcss-custom-properties/-/postcss-custom-properties-13.3.4.tgz", - "integrity": "sha512-9YN0gg9sG3OH+Z9xBrp2PWRb+O4msw+5Sbp3ZgqrblrwKspXVQe5zr5sVqi43gJGwW/Rv1A483PRQUzQOEewvA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/csstools" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - } - ], - "license": "MIT", - "dependencies": { - "@csstools/cascade-layer-name-parser": "^1.0.7", - "@csstools/css-parser-algorithms": "^2.5.0", - "@csstools/css-tokenizer": "^2.2.3", - "postcss-value-parser": "^4.2.0" - }, - "engines": { - "node": "^14 || ^16 || >=18" - }, - "peerDependencies": { - "postcss": "^8.4" - } - }, - "node_modules/postcss-custom-properties/node_modules/@csstools/cascade-layer-name-parser": { - "version": "1.0.13", - "resolved": "https://registry.npmjs.org/@csstools/cascade-layer-name-parser/-/cascade-layer-name-parser-1.0.13.tgz", - "integrity": "sha512-MX0yLTwtZzr82sQ0zOjqimpZbzjMaK/h2pmlrLK7DCzlmiZLYFpoO94WmN1akRVo6ll/TdpHb53vihHLUMyvng==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/csstools" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - } - ], - "license": "MIT", - "engines": { - "node": "^14 || ^16 || >=18" - }, - "peerDependencies": { - "@csstools/css-parser-algorithms": "^2.7.1", - "@csstools/css-tokenizer": "^2.4.1" - } - }, - "node_modules/postcss-custom-properties/node_modules/@csstools/css-parser-algorithms": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/@csstools/css-parser-algorithms/-/css-parser-algorithms-2.7.1.tgz", - "integrity": "sha512-2SJS42gxmACHgikc1WGesXLIT8d/q2l0UFM7TaEeIzdFCE/FPMtTiizcPGGJtlPo2xuQzY09OhrLTzRxqJqwGw==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/csstools" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - } - ], - "license": "MIT", - "engines": { - "node": "^14 || ^16 || >=18" - }, - "peerDependencies": { - "@csstools/css-tokenizer": "^2.4.1" - } - }, - "node_modules/postcss-custom-properties/node_modules/@csstools/css-tokenizer": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/@csstools/css-tokenizer/-/css-tokenizer-2.4.1.tgz", - "integrity": "sha512-eQ9DIktFJBhGjioABJRtUucoWR2mwllurfnM8LuNGAqX3ViZXaUchqk+1s7jjtkFiT9ySdACsFEA3etErkALUg==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/csstools" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - } - ], - "license": "MIT", - "engines": { - "node": "^14 || ^16 || >=18" - } - }, "node_modules/postcss-discard-comments": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/postcss-discard-comments/-/postcss-discard-comments-6.0.2.tgz", @@ -23089,10 +22950,6 @@ "node": ">=0.10.0" } }, - "node_modules/wporg-pattern-creator": { - "resolved": "public_html/wp-content/plugins/pattern-creator", - "link": true - }, "node_modules/wporg-pattern-directory": { "resolved": "public_html/wp-content/plugins/pattern-directory", "link": true @@ -23372,6 +23229,7 @@ "public_html/wp-content/plugins/pattern-creator": { "name": "wporg-pattern-creator", "version": "1.0.0", + "extraneous": true, "license": "GPL-2.0-or-later", "dependencies": { "@wordpress/a11y": "4.14.0", @@ -23410,1583 +23268,9 @@ "postcss-custom-properties": "13.3.4" } }, - "public_html/wp-content/plugins/pattern-creator/node_modules/@puppeteer/browsers": { - "version": "1.4.6", - "resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-1.4.6.tgz", - "integrity": "sha512-x4BEjr2SjOPowNeiguzjozQbsc6h437ovD/wu+JpaenxVLm3jkgzHY2xOslMTp50HoTvQreMjiexiGQw1sqZlQ==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "debug": "4.3.4", - "extract-zip": "2.0.1", - "progress": "2.0.3", - "proxy-agent": "6.3.0", - "tar-fs": "3.0.4", - "unbzip2-stream": "1.4.3", - "yargs": "17.7.1" - }, - "bin": { - "browsers": "lib/cjs/main-cli.js" - }, - "engines": { - "node": ">=16.3.0" - }, - "peerDependencies": { - "typescript": ">= 4.7.4" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/@puppeteer/browsers/node_modules/tar-fs": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.0.4.tgz", - "integrity": "sha512-5AFQU8b9qLfZCX9zp2duONhPmZv0hGYiBPJsyUdqMjzq/mqVpy/rEUSeHk1+YitmxugaptgBh5oDGU3VsAJq4w==", - "dev": true, - "license": "MIT", - "dependencies": { - "mkdirp-classic": "^0.5.2", - "pump": "^3.0.0", - "tar-stream": "^3.1.5" - } - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/@puppeteer/browsers/node_modules/tar-stream": { - "version": "3.1.7", - "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-3.1.7.tgz", - "integrity": "sha512-qJj60CXt7IU1Ffyc3NJMjh6EkuCFej46zUqJ4J7pqYlThyd9bO0XBTmcOIhSzZJVWfsLks0+nle/j538YAW9RQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "b4a": "^1.6.4", - "fast-fifo": "^1.2.0", - "streamx": "^2.15.0" - } - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/@sentry/core": { - "version": "6.19.7", - "resolved": "https://registry.npmjs.org/@sentry/core/-/core-6.19.7.tgz", - "integrity": "sha512-tOfZ/umqB2AcHPGbIrsFLcvApdTm9ggpi/kQZFkej7kMphjT+SGBiQfYtjyg9jcRW+ilAR4JXC9BGKsdEQ+8Vw==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@sentry/hub": "6.19.7", - "@sentry/minimal": "6.19.7", - "@sentry/types": "6.19.7", - "@sentry/utils": "6.19.7", - "tslib": "^1.9.3" - }, - "engines": { - "node": ">=6" - } - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/@sentry/node": { - "version": "6.19.7", - "resolved": "https://registry.npmjs.org/@sentry/node/-/node-6.19.7.tgz", - "integrity": "sha512-gtmRC4dAXKODMpHXKfrkfvyBL3cI8y64vEi3fDD046uqYcrWdgoQsffuBbxMAizc6Ez1ia+f0Flue6p15Qaltg==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@sentry/core": "6.19.7", - "@sentry/hub": "6.19.7", - "@sentry/types": "6.19.7", - "@sentry/utils": "6.19.7", - "cookie": "^0.4.1", - "https-proxy-agent": "^5.0.0", - "lru_map": "^0.3.3", - "tslib": "^1.9.3" - }, - "engines": { - "node": ">=6" - } - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/@sentry/types": { - "version": "6.19.7", - "resolved": "https://registry.npmjs.org/@sentry/types/-/types-6.19.7.tgz", - "integrity": "sha512-jH84pDYE+hHIbVnab3Hr+ZXr1v8QABfhx39KknxqKWr2l0oEItzepV0URvbEhB446lk/S/59230dlUUIBGsXbg==", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=6" - } - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/@sentry/utils": { - "version": "6.19.7", - "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-6.19.7.tgz", - "integrity": "sha512-z95ECmE3i9pbWoXQrD/7PgkBAzJYR+iXtPuTkpBjDKs86O3mT+PXOT3BAn79w2wkn7/i3vOGD2xVr1uiMl26dA==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@sentry/types": "6.19.7", - "tslib": "^1.9.3" - }, - "engines": { - "node": ">=6" - } - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/@wordpress/babel-preset-default": { - "version": "7.42.0", - "resolved": "https://registry.npmjs.org/@wordpress/babel-preset-default/-/babel-preset-default-7.42.0.tgz", - "integrity": "sha512-AWSxWuEuzazt/nWomKiaVhYQeXuqxTniPCKhvks58wB3P4UXvSe3hRnO+nujz20IuxIk2xHT6x47HgpDZy30jw==", - "dev": true, - "license": "GPL-2.0-or-later", - "dependencies": { - "@babel/core": "^7.16.0", - "@babel/plugin-transform-react-jsx": "^7.16.0", - "@babel/plugin-transform-runtime": "^7.16.0", - "@babel/preset-env": "^7.16.0", - "@babel/preset-typescript": "^7.16.0", - "@babel/runtime": "^7.16.0", - "@wordpress/babel-plugin-import-jsx-pragma": "^4.41.0", - "@wordpress/browserslist-config": "^5.41.0", - "@wordpress/warning": "^2.58.0", - "browserslist": "^4.21.10", - "core-js": "^3.31.0", - "react": "^18.3.0" - }, - "engines": { - "node": ">=14" - } - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/@wordpress/base-styles": { - "version": "4.49.0", - "resolved": "https://registry.npmjs.org/@wordpress/base-styles/-/base-styles-4.49.0.tgz", - "integrity": "sha512-yFRYqNtd26ULZ0oAHhCu/IcaA0XHI3E7kRCKajZqUvyRQj7YprXnpD3o0/pnwvF6ZFTXzCX8pXHjUc2TIv97ig==", - "dev": true, - "license": "GPL-2.0-or-later" - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/@wordpress/browserslist-config": { - "version": "5.41.0", - "resolved": "https://registry.npmjs.org/@wordpress/browserslist-config/-/browserslist-config-5.41.0.tgz", - "integrity": "sha512-J7ejzzDpPZddVIiq2YiK8J/pNTJDy3X1s+5ZtwkwklCxBMZJurxf9pEhtbaf7us0Q6c1j8Ubv7Fpx3lqk2ypxA==", - "dev": true, - "license": "GPL-2.0-or-later", - "engines": { - "node": ">=14" - } - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/@wordpress/e2e-test-utils-playwright": { - "version": "0.19.3", - "resolved": "https://registry.npmjs.org/@wordpress/e2e-test-utils-playwright/-/e2e-test-utils-playwright-0.19.3.tgz", - "integrity": "sha512-GdKZaNUjVqJ9zTI5cXlzSy+IXQiVS5sL9o0PNTV0ggTyCGzmqVvCgiUgauk1xSjk1PM+B+mU39Jr8kiYWJj0+Q==", - "dev": true, - "license": "GPL-2.0-or-later", - "dependencies": { - "@wordpress/api-fetch": "^6.48.1", - "@wordpress/keycodes": "^3.51.1", - "@wordpress/url": "^3.52.1", - "change-case": "^4.1.2", - "form-data": "^4.0.0", - "get-port": "^5.1.1", - "lighthouse": "^10.4.0", - "mime": "^3.0.0", - "web-vitals": "^3.5.0" - }, - "engines": { - "node": ">=12" - }, - "peerDependencies": { - "@playwright/test": ">=1" - } - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/@wordpress/e2e-test-utils-playwright/node_modules/@wordpress/api-fetch": { - "version": "6.55.0", - "resolved": "https://registry.npmjs.org/@wordpress/api-fetch/-/api-fetch-6.55.0.tgz", - "integrity": "sha512-1HrCUsJdeRY5Y0IjplotINwqMRO81e7O7VhBScuKk7iOuDm/E1ioKv2uLGnPNWziYu+Zf025byxOqVzXDyM2gw==", - "dev": true, - "license": "GPL-2.0-or-later", - "dependencies": { - "@babel/runtime": "^7.16.0", - "@wordpress/i18n": "^4.58.0", - "@wordpress/url": "^3.59.0" - }, - "engines": { - "node": ">=12" - } - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/@wordpress/e2e-test-utils-playwright/node_modules/@wordpress/hooks": { - "version": "3.58.0", - "resolved": "https://registry.npmjs.org/@wordpress/hooks/-/hooks-3.58.0.tgz", - "integrity": "sha512-9LB0ZHnZRQlORttux9t/xbAskF+dk2ujqzPGsVzc92mSKpQP3K2a5Wy74fUnInguB1vLUNHT6nrNdkVom5qX1Q==", - "dev": true, - "license": "GPL-2.0-or-later", - "dependencies": { - "@babel/runtime": "^7.16.0" - }, - "engines": { - "node": ">=12" - } - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/@wordpress/e2e-test-utils-playwright/node_modules/@wordpress/i18n": { - "version": "4.58.0", - "resolved": "https://registry.npmjs.org/@wordpress/i18n/-/i18n-4.58.0.tgz", - "integrity": "sha512-VfvS3BWv/RDjRKD6PscIcvYfWKnGJcI/DEqyDgUMhxCM6NRwoL478CsUKTiGJIymeyRodNRfprdcF086DpGKYw==", - "dev": true, - "license": "GPL-2.0-or-later", - "dependencies": { - "@babel/runtime": "^7.16.0", - "@wordpress/hooks": "^3.58.0", - "gettext-parser": "^1.3.1", - "memize": "^2.1.0", - "sprintf-js": "^1.1.1", - "tannin": "^1.2.0" - }, - "bin": { - "pot-to-php": "tools/pot-to-php.js" - }, - "engines": { - "node": ">=12" - } - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/@wordpress/e2e-test-utils-playwright/node_modules/@wordpress/keycodes": { - "version": "3.58.0", - "resolved": "https://registry.npmjs.org/@wordpress/keycodes/-/keycodes-3.58.0.tgz", - "integrity": "sha512-Q/LRKpx8ndzuHlkxSQ2BD+NTYYKQPIneNNMng8hTAfyU7RFwXpqj06HpeOFGh4XIdPKCs/8hmucoLJRmmLmZJA==", - "dev": true, - "license": "GPL-2.0-or-later", - "dependencies": { - "@babel/runtime": "^7.16.0", - "@wordpress/i18n": "^4.58.0" - }, - "engines": { - "node": ">=12" - } - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/@wordpress/e2e-test-utils-playwright/node_modules/@wordpress/url": { - "version": "3.59.0", - "resolved": "https://registry.npmjs.org/@wordpress/url/-/url-3.59.0.tgz", - "integrity": "sha512-GxvoMjYCav0w4CiX0i0h3qflrE/9rhLIZg5aPCQjbrBdwTxYR3Exfw0IJYcmVaTKXQOUU8fOxlDxULsbLmKe9w==", - "dev": true, - "license": "GPL-2.0-or-later", - "dependencies": { - "@babel/runtime": "^7.16.0", - "remove-accents": "^0.5.0" - }, - "engines": { - "node": ">=12" - } - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/@wordpress/eslint-plugin": { - "version": "17.13.0", - "resolved": "https://registry.npmjs.org/@wordpress/eslint-plugin/-/eslint-plugin-17.13.0.tgz", - "integrity": "sha512-QnG5HmOd+XsweKOvrqbOugm9rINUjcsh1jo2SN4cbbTWZJ6nPmcfLS0YJdrKkgOQUnKDPQgBPVEyI8tp19OtBw==", - "dev": true, - "license": "GPL-2.0-or-later", - "dependencies": { - "@babel/eslint-parser": "^7.16.0", - "@typescript-eslint/eslint-plugin": "^6.4.1", - "@typescript-eslint/parser": "^6.4.1", - "@wordpress/babel-preset-default": "^7.40.0", - "@wordpress/prettier-config": "^3.13.0", - "cosmiconfig": "^7.0.0", - "eslint-config-prettier": "^8.3.0", - "eslint-plugin-import": "^2.25.2", - "eslint-plugin-jest": "^27.2.3", - "eslint-plugin-jsdoc": "^46.4.6", - "eslint-plugin-jsx-a11y": "^6.5.1", - "eslint-plugin-playwright": "^0.15.3", - "eslint-plugin-prettier": "^5.0.0", - "eslint-plugin-react": "^7.27.0", - "eslint-plugin-react-hooks": "^4.3.0", - "globals": "^13.12.0", - "requireindex": "^1.2.0" - }, - "engines": { - "node": ">=14", - "npm": ">=6.14.4" - }, - "peerDependencies": { - "@babel/core": ">=7", - "eslint": ">=8", - "prettier": ">=3", - "typescript": ">=4" - }, - "peerDependenciesMeta": { - "prettier": { - "optional": true - }, - "typescript": { - "optional": true - } - } - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/@wordpress/jest-console": { - "version": "7.29.0", - "resolved": "https://registry.npmjs.org/@wordpress/jest-console/-/jest-console-7.29.0.tgz", - "integrity": "sha512-/9PZJhyszdRX4mka7t1WzoooM+Q/DwC4jkNVtJxqci5lbL3Lrhy1cCJGCgMr1n/9w+zs7eLmExFBvV4v44iyNw==", - "dev": true, - "license": "GPL-2.0-or-later", - "dependencies": { - "@babel/runtime": "^7.16.0", - "jest-matcher-utils": "^29.6.2" - }, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "jest": ">=29" - } - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/@wordpress/jest-preset-default": { - "version": "11.29.0", - "resolved": "https://registry.npmjs.org/@wordpress/jest-preset-default/-/jest-preset-default-11.29.0.tgz", - "integrity": "sha512-7LA0ZS5t0Thn7xrdwPL3hLgjB9LKloneGhMwnnDUTgJP330lyfdDfJ+O6Lnz3iL+bg68mkA3AzrT9Fs9f3WKww==", - "dev": true, - "license": "GPL-2.0-or-later", - "dependencies": { - "@wordpress/jest-console": "^7.29.0", - "babel-jest": "^29.6.2" - }, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "@babel/core": ">=7", - "jest": ">=29" - } - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/@wordpress/npm-package-json-lint-config": { - "version": "4.43.0", - "resolved": "https://registry.npmjs.org/@wordpress/npm-package-json-lint-config/-/npm-package-json-lint-config-4.43.0.tgz", - "integrity": "sha512-XSb7AdDC7yGTBVYeRM4oqmOygEB+/+tk7lobLIGDmlZJs+M3F/NUvQq0Vcas1pojq2fyPYTUwOlu81ga33fNwQ==", - "dev": true, - "license": "GPL-2.0-or-later", - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "npm-package-json-lint": ">=6.0.0" - } - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/@wordpress/postcss-plugins-preset": { - "version": "4.42.0", - "resolved": "https://registry.npmjs.org/@wordpress/postcss-plugins-preset/-/postcss-plugins-preset-4.42.0.tgz", - "integrity": "sha512-5xmKF7IUsqS5JcmJlHKHq7RaR6ZpaLj3n9c+X0X0/Oo7ZCIGp6WeDQngx13sH4NJoKXrZ9g4n1rbzhEKeo/Wtg==", - "dev": true, - "license": "GPL-2.0-or-later", - "dependencies": { - "@wordpress/base-styles": "^4.49.0", - "autoprefixer": "^10.2.5" - }, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "postcss": "^8.0.0" - } - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/@wordpress/prettier-config": { - "version": "3.15.0", - "resolved": "https://registry.npmjs.org/@wordpress/prettier-config/-/prettier-config-3.15.0.tgz", - "integrity": "sha512-exC2rkEioTt//AnzPRyaaFv8FNYIvamPDytNol5bKQ6Qh65QSdZZE9V+GtRCrIPL7/Bq6xba03XuRVxl9TjtJg==", - "dev": true, - "license": "GPL-2.0-or-later", - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "prettier": ">=3" - } - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/@wordpress/scripts": { - "version": "27.2.0", - "resolved": "https://registry.npmjs.org/@wordpress/scripts/-/scripts-27.2.0.tgz", - "integrity": "sha512-xkrNYRuXxtkCkxtBWq7H46cgvbBHzfy8VdELqXn5XwK8S+ytDVOe3YUXqhisn9VdPurrjgfgAa/qNMA3xPr90Q==", - "dev": true, - "license": "GPL-2.0-or-later", - "dependencies": { - "@babel/core": "^7.16.0", - "@pmmmwh/react-refresh-webpack-plugin": "^0.5.11", - "@svgr/webpack": "^8.0.1", - "@wordpress/babel-preset-default": "^7.35.0", - "@wordpress/browserslist-config": "^5.34.0", - "@wordpress/dependency-extraction-webpack-plugin": "^5.2.0", - "@wordpress/e2e-test-utils-playwright": "^0.19.0", - "@wordpress/eslint-plugin": "^17.8.0", - "@wordpress/jest-preset-default": "^11.22.0", - "@wordpress/npm-package-json-lint-config": "^4.36.0", - "@wordpress/postcss-plugins-preset": "^4.35.0", - "@wordpress/prettier-config": "^3.8.0", - "@wordpress/stylelint-config": "^21.34.0", - "adm-zip": "^0.5.9", - "babel-jest": "^29.6.2", - "babel-loader": "^8.2.3", - "browserslist": "^4.21.10", - "chalk": "^4.0.0", - "check-node-version": "^4.1.0", - "clean-webpack-plugin": "^3.0.0", - "copy-webpack-plugin": "^10.2.0", - "cross-spawn": "^5.1.0", - "css-loader": "^6.2.0", - "cssnano": "^6.0.1", - "cwd": "^0.10.0", - "dir-glob": "^3.0.1", - "eslint": "^8.3.0", - "expect-puppeteer": "^4.4.0", - "fast-glob": "^3.2.7", - "filenamify": "^4.2.0", - "jest": "^29.6.2", - "jest-dev-server": "^9.0.1", - "jest-environment-jsdom": "^29.6.2", - "jest-environment-node": "^29.6.2", - "markdownlint-cli": "^0.31.1", - "merge-deep": "^3.0.3", - "mini-css-extract-plugin": "^2.5.1", - "minimist": "^1.2.0", - "npm-package-json-lint": "^6.4.0", - "npm-packlist": "^3.0.0", - "playwright-core": "1.39.0", - "postcss": "^8.4.5", - "postcss-loader": "^6.2.1", - "prettier": "npm:wp-prettier@3.0.3", - "puppeteer-core": "^13.2.0", - "react-refresh": "^0.14.0", - "read-pkg-up": "^7.0.1", - "resolve-bin": "^0.4.0", - "sass": "^1.35.2", - "sass-loader": "^12.1.0", - "source-map-loader": "^3.0.0", - "stylelint": "^14.2.0", - "terser-webpack-plugin": "^5.3.9", - "url-loader": "^4.1.1", - "webpack": "^5.88.2", - "webpack-bundle-analyzer": "^4.9.1", - "webpack-cli": "^5.1.4", - "webpack-dev-server": "^4.15.1" - }, - "bin": { - "wp-scripts": "bin/wp-scripts.js" - }, - "engines": { - "node": ">=18", - "npm": ">=6.14.4" - }, - "peerDependencies": { - "@playwright/test": "^1.39.0", - "react": "^18.0.0", - "react-dom": "^18.0.0" - } - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/@wordpress/stylelint-config": { - "version": "21.41.0", - "resolved": "https://registry.npmjs.org/@wordpress/stylelint-config/-/stylelint-config-21.41.0.tgz", - "integrity": "sha512-2wxFu8ICeRGF3Lxz7H7o2SU1u6pTI4mjuog39DgtCNb+v+f6yhgREDuNQEeti3Svb0rjj63AJ7r2CqLZk+EQIQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "stylelint-config-recommended": "^6.0.0", - "stylelint-config-recommended-scss": "^5.0.2" - }, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "stylelint": "^14.2" - } - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/@wordpress/warning": { - "version": "2.58.0", - "resolved": "https://registry.npmjs.org/@wordpress/warning/-/warning-2.58.0.tgz", - "integrity": "sha512-9bZlORhyMY2nbWozeyC5kqJsFzEPP4DCLhGmjtbv+YWGHttUrxUZEfrKdqO+rUODA8rP5zeIly1nCQOUnkw4Lg==", - "dev": true, - "license": "GPL-2.0-or-later", - "engines": { - "node": ">=12" - } - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/agent-base": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.3.tgz", - "integrity": "sha512-jRR5wdylq8CkOe6hei19GGZnxM6rBGwFl3Bg0YItGDimvjGtAvdZk4Pu6Cl4u4Igsws4a1fd1Vq3ezrhn4KmFw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 14" - } - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/axe-core": { - "version": "4.7.2", - "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.7.2.tgz", - "integrity": "sha512-zIURGIS1E1Q4pcrMjp+nnEh+16G56eG/MUllJH8yEvw7asDo7Ac9uhC9KIH5jzpITueEZolfYglnCGIuSBz39g==", - "dev": true, - "license": "MPL-2.0", - "engines": { - "node": ">=4" - } - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/babel-loader": { - "version": "8.4.1", - "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-8.4.1.tgz", - "integrity": "sha512-nXzRChX+Z1GoE6yWavBQg6jDslyFF3SDjl2paADuoQtQW10JqShJt62R6eJQ5m/pjJFDT8xgKIWSP85OY8eXeA==", - "dev": true, - "license": "MIT", - "dependencies": { - "find-cache-dir": "^3.3.1", - "loader-utils": "^2.0.4", - "make-dir": "^3.1.0", - "schema-utils": "^2.6.5" - }, - "engines": { - "node": ">= 8.9" - }, - "peerDependencies": { - "@babel/core": "^7.0.0", - "webpack": ">=2" - } - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/balanced-match": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-2.0.0.tgz", - "integrity": "sha512-1ugUSr8BHXRnK23KfuYS+gVMC3LB8QGH9W1iGtDPsNWoQbgtXSExkBu2aDR4epiGWZOjZsj6lDl/N/AqqTC3UA==", - "dev": true, - "license": "MIT" - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/chrome-launcher": { - "version": "0.15.2", - "resolved": "https://registry.npmjs.org/chrome-launcher/-/chrome-launcher-0.15.2.tgz", - "integrity": "sha512-zdLEwNo3aUVzIhKhTtXfxhdvZhUghrnmkvcAq2NoDd+LeOHKf03H5jwZ8T/STsAlzyALkBVK552iaG1fGf1xVQ==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@types/node": "*", - "escape-string-regexp": "^4.0.0", - "is-wsl": "^2.2.0", - "lighthouse-logger": "^1.0.0" - }, - "bin": { - "print-chrome-path": "bin/print-chrome-path.js" - }, - "engines": { - "node": ">=12.13.0" - } - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/cookie": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz", - "integrity": "sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/cosmiconfig": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.1.0.tgz", - "integrity": "sha512-AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/parse-json": "^4.0.0", - "import-fresh": "^3.2.1", - "parse-json": "^5.0.0", - "path-type": "^4.0.0", - "yaml": "^1.10.0" - }, - "engines": { - "node": ">=10" - } - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/cross-spawn": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", - "integrity": "sha512-pTgQJ5KC0d2hcY8eyL1IzlBPYjTkyH72XRZPnLyKus2mBfNjQs3klqbJU2VILqZryAZUt9JOb3h/mWMy23/f5A==", - "dev": true, - "license": "MIT", - "dependencies": { - "lru-cache": "^4.0.1", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/devtools-protocol": { - "version": "0.0.1155343", - "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1155343.tgz", - "integrity": "sha512-oD9vGBV2wTc7fAzAM6KC0chSgs234V8+qDEeK+mcbRj2UvcuA7lgBztGi/opj/iahcXD3BSj8Ymvib628yy9FA==", - "dev": true, - "license": "BSD-3-Clause" - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/extract-zip": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz", - "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "debug": "^4.1.1", - "get-stream": "^5.1.0", - "yauzl": "^2.10.0" - }, - "bin": { - "extract-zip": "cli.js" - }, - "engines": { - "node": ">= 10.17.0" - }, - "optionalDependencies": { - "@types/yauzl": "^2.9.1" - } - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/find-cache-dir": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz", - "integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==", - "dev": true, - "license": "MIT", - "dependencies": { - "commondir": "^1.0.1", - "make-dir": "^3.0.2", - "pkg-dir": "^4.1.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/avajs/find-cache-dir?sponsor=1" - } - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/global-modules": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-2.0.0.tgz", - "integrity": "sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A==", - "dev": true, - "license": "MIT", - "dependencies": { - "global-prefix": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/global-prefix": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-3.0.0.tgz", - "integrity": "sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg==", - "dev": true, - "license": "MIT", - "dependencies": { - "ini": "^1.3.5", - "kind-of": "^6.0.2", - "which": "^1.3.1" - }, - "engines": { - "node": ">=6" - } - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/globals": { - "version": "13.24.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", - "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/http-proxy-agent": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", - "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", - "dev": true, - "license": "MIT", - "dependencies": { - "agent-base": "^7.1.0", - "debug": "^4.3.4" - }, - "engines": { - "node": ">= 14" - } - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/intl-messageformat": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/intl-messageformat/-/intl-messageformat-4.4.0.tgz", - "integrity": "sha512-z+Bj2rS3LZSYU4+sNitdHrwnBhr0wO80ZJSW8EzKDBowwUe3Q/UsvgCGjrwa+HPzoGCLEb9HAjfJgo4j2Sac8w==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "intl-messageformat-parser": "^1.8.1" - } - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/jest-dev-server": { - "version": "9.0.2", - "resolved": "https://registry.npmjs.org/jest-dev-server/-/jest-dev-server-9.0.2.tgz", - "integrity": "sha512-Zc/JB0IlNNrpXkhBw+h86cGrde/Mey52KvF+FER2eyrtYJTHObOwW7Iarxm3rPyTKby5+3Y2QZtl8pRz/5GCxg==", - "dev": true, - "dependencies": { - "chalk": "^4.1.2", - "cwd": "^0.10.0", - "find-process": "^1.4.7", - "prompts": "^2.4.2", - "spawnd": "^9.0.2", - "tree-kill": "^1.2.2", - "wait-on": "^7.2.0" - }, - "engines": { - "node": ">=16" - } - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/known-css-properties": { - "version": "0.26.0", - "resolved": "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.26.0.tgz", - "integrity": "sha512-5FZRzrZzNTBruuurWpvZnvP9pum+fe0HcK8z/ooo+U+Hmp4vtbyp1/QDsqmufirXy4egGzbaH/y2uCZf+6W5Kg==", - "dev": true, - "license": "MIT" - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/lighthouse": { - "version": "10.4.0", - "resolved": "https://registry.npmjs.org/lighthouse/-/lighthouse-10.4.0.tgz", - "integrity": "sha512-XQWHEWkJ8YxSPsxttBJORy5+hQrzbvGkYfeP3fJjyYKioWkF2MXfFqNK4ZuV4jL8pBu7Z91qnQP6In0bq1yXww==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@sentry/node": "^6.17.4", - "axe-core": "4.7.2", - "chrome-launcher": "^0.15.2", - "configstore": "^5.0.1", - "csp_evaluator": "1.1.1", - "devtools-protocol": "0.0.1155343", - "enquirer": "^2.3.6", - "http-link-header": "^1.1.1", - "intl-messageformat": "^4.4.0", - "jpeg-js": "^0.4.4", - "js-library-detector": "^6.6.0", - "lighthouse-logger": "^1.4.1", - "lighthouse-stack-packs": "1.11.0", - "lodash": "^4.17.21", - "lookup-closest-locale": "6.2.0", - "metaviewport-parser": "0.3.0", - "open": "^8.4.0", - "parse-cache-control": "1.0.1", - "ps-list": "^8.0.0", - "puppeteer-core": "^20.8.0", - "robots-parser": "^3.0.0", - "semver": "^5.3.0", - "speedline-core": "^1.4.3", - "third-party-web": "^0.23.3", - "ws": "^7.0.0", - "yargs": "^17.3.1", - "yargs-parser": "^21.0.0" - }, - "bin": { - "chrome-debug": "core/scripts/manual-chrome-launcher.js", - "lighthouse": "cli/index.js", - "smokehouse": "cli/test/smokehouse/frontends/smokehouse-bin.js" - }, - "engines": { - "node": ">=16.16" - } - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/lighthouse-logger": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/lighthouse-logger/-/lighthouse-logger-1.4.2.tgz", - "integrity": "sha512-gPWxznF6TKmUHrOQjlVo2UbaL2EJ71mb2CCeRs/2qBpi4L/g4LUVc9+3lKQ6DTUZwJswfM7ainGrLO1+fOqa2g==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "debug": "^2.6.9", - "marky": "^1.2.2" - } - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/lighthouse-logger/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "2.0.0" - } - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/lighthouse-logger/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true, - "license": "MIT" - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/lighthouse-stack-packs": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/lighthouse-stack-packs/-/lighthouse-stack-packs-1.11.0.tgz", - "integrity": "sha512-sRr0z1S/I26VffRLq9KJsKtLk856YrJlNGmcJmbLX8dFn3MuzVPUbstuChEhqnSxZb8TZmVfthuXuwhG9vRoSw==", - "dev": true, - "license": "Apache-2.0" - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/lighthouse/node_modules/cross-fetch": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-4.0.0.tgz", - "integrity": "sha512-e4a5N8lVvuLgAWgnCrLr2PP0YyDOTHa9H/Rj54dirp61qXnNq46m82bRhNqIA5VccJtWBvPTFRV3TtvHUKPB1g==", - "dev": true, - "license": "MIT", - "dependencies": { - "node-fetch": "^2.6.12" - } - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/lighthouse/node_modules/puppeteer-core": { - "version": "20.9.0", - "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-20.9.0.tgz", - "integrity": "sha512-H9fYZQzMTRrkboEfPmf7m3CLDN6JvbxXA3qTtS+dFt27tR+CsFHzPsT6pzp6lYL6bJbAPaR0HaPO6uSi+F94Pg==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@puppeteer/browsers": "1.4.6", - "chromium-bidi": "0.4.16", - "cross-fetch": "4.0.0", - "debug": "4.3.4", - "devtools-protocol": "0.0.1147663", - "ws": "8.13.0" - }, - "engines": { - "node": ">=16.3.0" - }, - "peerDependencies": { - "typescript": ">= 4.7.4" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/lighthouse/node_modules/puppeteer-core/node_modules/chromium-bidi": { - "version": "0.4.16", - "resolved": "https://registry.npmjs.org/chromium-bidi/-/chromium-bidi-0.4.16.tgz", - "integrity": "sha512-7ZbXdWERxRxSwo3txsBjjmc/NLxqb1Bk30mRb0BMS4YIaiV6zvKZqL/UAH+DdqcDYayDWk2n/y8klkBDODrPvA==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "mitt": "3.0.0" - }, - "peerDependencies": { - "devtools-protocol": "*" - } - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/lighthouse/node_modules/puppeteer-core/node_modules/devtools-protocol": { - "version": "0.0.1147663", - "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1147663.tgz", - "integrity": "sha512-hyWmRrexdhbZ1tcJUGpO95ivbRhWXz++F4Ko+n21AY5PNln2ovoJw+8ZMNDTtip+CNFQfrtLVh/w4009dXO/eQ==", - "dev": true, - "license": "BSD-3-Clause" - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/lighthouse/node_modules/puppeteer-core/node_modules/ws": { - "version": "8.13.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.13.0.tgz", - "integrity": "sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10.0.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": ">=5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } - } - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/lighthouse/node_modules/semver": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", - "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver" - } - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/lru-cache": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", - "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", - "dev": true, - "license": "ISC", - "dependencies": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" - } - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", - "dev": true, - "license": "MIT", - "dependencies": { - "semver": "^6.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/mitt": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/mitt/-/mitt-3.0.0.tgz", - "integrity": "sha512-7dX2/10ITVyqh4aOSVI9gdape+t9l2/8QxHrFmUXu4EEUpdlxl6RudZUPZoc+zuY2hk1j7XxVroIVIan/pD/SQ==", - "dev": true, - "license": "MIT" - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true, - "license": "MIT" - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/node-fetch": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", - "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", - "dev": true, - "license": "MIT", - "dependencies": { - "whatwg-url": "^5.0.0" - }, - "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } - } - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "find-up": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/playwright-core": { - "version": "1.39.0", - "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.39.0.tgz", - "integrity": "sha512-+k4pdZgs1qiM+OUkSjx96YiKsXsmb59evFoqv8SKO067qBA+Z2s/dCzJij/ZhdQcs2zlTAgRKfeiiLm8PQ2qvw==", - "dev": true, - "license": "Apache-2.0", - "bin": { - "playwright-core": "cli.js" - }, - "engines": { - "node": ">=16" - } - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/postcss-safe-parser": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/postcss-safe-parser/-/postcss-safe-parser-6.0.0.tgz", - "integrity": "sha512-FARHN8pwH+WiS2OPCxJI8FuRJpTVnn6ZNFiqAM2aeW2LwTHWWmWgIyKC6cUo0L8aeKiF/14MNvnpls6R2PBeMQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - "peerDependencies": { - "postcss": "^8.3.3" - } - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/proxy-agent": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-6.3.0.tgz", - "integrity": "sha512-0LdR757eTj/JfuU7TL2YCuAZnxWXu3tkJbg4Oq3geW/qFNT/32T0sp2HnZ9O0lMR4q3vwAt0+xCA8SR0WAD0og==", - "dev": true, - "license": "MIT", - "dependencies": { - "agent-base": "^7.0.2", - "debug": "^4.3.4", - "http-proxy-agent": "^7.0.0", - "https-proxy-agent": "^7.0.0", - "lru-cache": "^7.14.1", - "pac-proxy-agent": "^7.0.0", - "proxy-from-env": "^1.1.0", - "socks-proxy-agent": "^8.0.1" - }, - "engines": { - "node": ">= 14" - } - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/proxy-agent/node_modules/https-proxy-agent": { - "version": "7.0.6", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz", - "integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==", - "dev": true, - "license": "MIT", - "dependencies": { - "agent-base": "^7.1.2", - "debug": "4" - }, - "engines": { - "node": ">= 14" - } - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/proxy-agent/node_modules/lru-cache": { - "version": "7.18.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", - "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=12" - } - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/puppeteer-core": { - "version": "13.7.0", - "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-13.7.0.tgz", - "integrity": "sha512-rXja4vcnAzFAP1OVLq/5dWNfwBGuzcOARJ6qGV7oAZhnLmVRU8G5MsdeQEAOy332ZhkIOnn9jp15R89LKHyp2Q==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "cross-fetch": "3.1.5", - "debug": "4.3.4", - "devtools-protocol": "0.0.981744", - "extract-zip": "2.0.1", - "https-proxy-agent": "5.0.1", - "pkg-dir": "4.2.0", - "progress": "2.0.3", - "proxy-from-env": "1.1.0", - "rimraf": "3.0.2", - "tar-fs": "2.1.1", - "unbzip2-stream": "1.4.3", - "ws": "8.5.0" - }, - "engines": { - "node": ">=10.18.1" - } - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/puppeteer-core/node_modules/devtools-protocol": { - "version": "0.0.981744", - "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.981744.tgz", - "integrity": "sha512-0cuGS8+jhR67Fy7qG3i3Pc7Aw494sb9yG9QgpG97SFVWwolgYjlhJg7n+UaHxOQT30d1TYu/EYe9k01ivLErIg==", - "dev": true, - "license": "BSD-3-Clause" - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/puppeteer-core/node_modules/ws": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.5.0.tgz", - "integrity": "sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10.0.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } - } - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/readable-stream": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", - "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", - "dev": true, - "license": "MIT", - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "deprecated": "Rimraf versions prior to v4 are no longer supported", - "dev": true, - "license": "ISC", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/rxjs": { - "version": "7.8.1", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", - "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.1.0" - } - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/rxjs/node_modules/tslib": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "dev": true, - "license": "0BSD" - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/sass-loader": { - "version": "12.6.0", - "resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-12.6.0.tgz", - "integrity": "sha512-oLTaH0YCtX4cfnJZxKSLAyglED0naiYfNG1iXfU5w1LNZ+ukoA5DtyDIN5zmKVZwYNJP4KRc5Y3hkWga+7tYfA==", - "dev": true, - "license": "MIT", - "dependencies": { - "klona": "^2.0.4", - "neo-async": "^2.6.2" - }, - "engines": { - "node": ">= 12.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependencies": { - "fibers": ">= 3.1.0", - "node-sass": "^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0", - "sass": "^1.3.0", - "sass-embedded": "*", - "webpack": "^5.0.0" - }, - "peerDependenciesMeta": { - "fibers": { - "optional": true - }, - "node-sass": { - "optional": true - }, - "sass": { - "optional": true - }, - "sass-embedded": { - "optional": true - } - } - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/schema-utils": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.1.tgz", - "integrity": "sha512-SHiNtMOUGWBQJwzISiVYKu82GiV4QYGePp3odlY1tuKO7gPtphAT5R/py0fA6xtbgLL/RvtJZnU9b8s0F1q0Xg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/json-schema": "^7.0.5", - "ajv": "^6.12.4", - "ajv-keywords": "^3.5.2" - }, - "engines": { - "node": ">= 8.9.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - } - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==", - "dev": true, - "license": "MIT", - "dependencies": { - "shebang-regex": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/signal-exit": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", - "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/spawnd": { - "version": "9.0.2", - "resolved": "https://registry.npmjs.org/spawnd/-/spawnd-9.0.2.tgz", - "integrity": "sha512-nl8DVHEDQ57IcKakzpjanspVChkMpGLuVwMR/eOn9cXE55Qr6luD2Kn06sA0ootRMdgrU4tInN6lA6ohTNvysw==", - "dev": true, - "dependencies": { - "signal-exit": "^4.1.0", - "tree-kill": "^1.2.2" - }, - "engines": { - "node": ">=16" - } - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/stylelint": { - "version": "14.16.1", - "resolved": "https://registry.npmjs.org/stylelint/-/stylelint-14.16.1.tgz", - "integrity": "sha512-ErlzR/T3hhbV+a925/gbfc3f3Fep9/bnspMiJPorfGEmcBbXdS+oo6LrVtoUZ/w9fqD6o6k7PtUlCOsCRdjX/A==", - "dev": true, - "license": "MIT", - "dependencies": { - "@csstools/selector-specificity": "^2.0.2", - "balanced-match": "^2.0.0", - "colord": "^2.9.3", - "cosmiconfig": "^7.1.0", - "css-functions-list": "^3.1.0", - "debug": "^4.3.4", - "fast-glob": "^3.2.12", - "fastest-levenshtein": "^1.0.16", - "file-entry-cache": "^6.0.1", - "global-modules": "^2.0.0", - "globby": "^11.1.0", - "globjoin": "^0.1.4", - "html-tags": "^3.2.0", - "ignore": "^5.2.1", - "import-lazy": "^4.0.0", - "imurmurhash": "^0.1.4", - "is-plain-object": "^5.0.0", - "known-css-properties": "^0.26.0", - "mathml-tag-names": "^2.1.3", - "meow": "^9.0.0", - "micromatch": "^4.0.5", - "normalize-path": "^3.0.0", - "picocolors": "^1.0.0", - "postcss": "^8.4.19", - "postcss-media-query-parser": "^0.2.3", - "postcss-resolve-nested-selector": "^0.1.1", - "postcss-safe-parser": "^6.0.0", - "postcss-selector-parser": "^6.0.11", - "postcss-value-parser": "^4.2.0", - "resolve-from": "^5.0.0", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1", - "style-search": "^0.1.0", - "supports-hyperlinks": "^2.3.0", - "svg-tags": "^1.0.0", - "table": "^6.8.1", - "v8-compile-cache": "^2.3.0", - "write-file-atomic": "^4.0.2" - }, - "bin": { - "stylelint": "bin/stylelint.js" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/stylelint" - } - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/stylelint-config-recommended": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/stylelint-config-recommended/-/stylelint-config-recommended-6.0.0.tgz", - "integrity": "sha512-ZorSSdyMcxWpROYUvLEMm0vSZud2uB7tX1hzBZwvVY9SV/uly4AvvJPPhCcymZL3fcQhEQG5AELmrxWqtmzacw==", - "dev": true, - "license": "MIT", - "peerDependencies": { - "stylelint": "^14.0.0" - } - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/stylelint-config-recommended-scss": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/stylelint-config-recommended-scss/-/stylelint-config-recommended-scss-5.0.2.tgz", - "integrity": "sha512-b14BSZjcwW0hqbzm9b0S/ScN2+3CO3O4vcMNOw2KGf8lfVSwJ4p5TbNEXKwKl1+0FMtgRXZj6DqVUe/7nGnuBg==", - "dev": true, - "license": "MIT", - "dependencies": { - "postcss-scss": "^4.0.2", - "stylelint-config-recommended": "^6.0.0", - "stylelint-scss": "^4.0.0" - }, - "peerDependencies": { - "stylelint": "^14.0.0" - } - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/stylelint-scss": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/stylelint-scss/-/stylelint-scss-4.7.0.tgz", - "integrity": "sha512-TSUgIeS0H3jqDZnby1UO1Qv3poi1N8wUYIJY6D1tuUq2MN3lwp/rITVo0wD+1SWTmRm0tNmGO0b7nKInnqF6Hg==", - "dev": true, - "license": "MIT", - "dependencies": { - "postcss-media-query-parser": "^0.2.3", - "postcss-resolve-nested-selector": "^0.1.1", - "postcss-selector-parser": "^6.0.11", - "postcss-value-parser": "^4.2.0" - }, - "peerDependencies": { - "stylelint": "^14.5.1 || ^15.0.0" - } - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/supports-hyperlinks": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.3.0.tgz", - "integrity": "sha512-RpsAZlpWcDwOPQA22aCH4J0t7L8JmAvsCxfOSEwm7cQs3LshN36QaTkwd70DnBOXDWGssw2eUoc8CaRWT0XunA==", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0", - "supports-color": "^7.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/tar-fs": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", - "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==", - "dev": true, - "license": "MIT", - "dependencies": { - "chownr": "^1.1.1", - "mkdirp-classic": "^0.5.2", - "pump": "^3.0.0", - "tar-stream": "^2.1.4" - } - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/tar-stream": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", - "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "bl": "^4.0.3", - "end-of-stream": "^1.4.1", - "fs-constants": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^3.1.1" - }, - "engines": { - "node": ">=6" - } - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/third-party-web": { - "version": "0.23.4", - "resolved": "https://registry.npmjs.org/third-party-web/-/third-party-web-0.23.4.tgz", - "integrity": "sha512-kwYnSZRhEvv0SBW2fp8SBBKRglMoBjV8xz6C31m0ewqOtknB5UL+Ihg+M81hyFY5ldkZuGWPb+e4GVDkzf/gYg==", - "dev": true, - "license": "MIT" - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", - "dev": true, - "license": "MIT" - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true, - "license": "0BSD" - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/wait-on": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/wait-on/-/wait-on-7.2.0.tgz", - "integrity": "sha512-wCQcHkRazgjG5XoAq9jbTMLpNIjoSlZslrJ2+N9MxDsGEv1HnFoVjOCexL0ESva7Y9cu350j+DWADdk54s4AFQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "axios": "^1.6.1", - "joi": "^17.11.0", - "lodash": "^4.17.21", - "minimist": "^1.2.8", - "rxjs": "^7.8.1" - }, - "bin": { - "wait-on": "bin/wait-on" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/web-vitals": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/web-vitals/-/web-vitals-3.5.2.tgz", - "integrity": "sha512-c0rhqNcHXRkY/ogGDJQxZ9Im9D19hDihbzSQJrsioex+KnFgmMzBiy57Z1EjkhX/+OjyBpclDCzz2ITtjokFmg==", - "dev": true, - "license": "Apache-2.0" - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", - "dev": true, - "license": "BSD-2-Clause" - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", - "dev": true, - "license": "MIT", - "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "license": "ISC", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "which": "bin/which" - } - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/ws": { - "version": "7.5.10", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz", - "integrity": "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.3.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } - } - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==", - "dev": true, - "license": "ISC" - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/yaml": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", - "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", - "dev": true, - "license": "ISC", - "engines": { - "node": ">= 6" - } - }, - "public_html/wp-content/plugins/pattern-creator/node_modules/yargs": { - "version": "17.7.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.1.tgz", - "integrity": "sha512-cwiTb08Xuv5fqF4AovYacTFNxk62th7LKJ6BL9IGUpTJrWoU7/7WdQGTP2SjKf1dUNBGzDd28p/Yfs/GI6JrLw==", - "dev": true, - "license": "MIT", - "dependencies": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" - }, - "engines": { - "node": ">=12" - } - }, - "public_html/wp-content/plugins/pattern-directory": { - "name": "wporg-pattern-directory", - "version": "1.0.0", + "public_html/wp-content/plugins/pattern-directory": { + "name": "wporg-pattern-directory", + "version": "1.0.0", "license": "GPL-2.0-or-later", "dependencies": { "@wordpress/a11y": "4.14.0", @@ -25001,7 +23285,8 @@ "@wordpress/i18n": "5.14.0", "@wordpress/notices": "5.14.0", "@wordpress/plugins": "7.14.0", - "@wordpress/scripts": "30.7.0" + "@wordpress/scripts": "30.7.0", + "clsx": "2.1.1" } }, "public_html/wp-content/themes/pattern-directory": { diff --git a/package.json b/package.json index 8928dbb1e..8b1787c7d 100644 --- a/package.json +++ b/package.json @@ -11,10 +11,9 @@ "@wordpress/stylelint-config": "23.6.0" }, "scripts": { - "build:creator": "npm run build --workspace=wporg-pattern-creator", "build:directory": "npm run build --workspace=wporg-pattern-directory", "build:theme": "npm run build --workspace=wporg-pattern-directory-2024-theme", - "start:creator": "npm run start --workspace=wporg-pattern-creator", + "build": "npm run build --workspaces", "start:directory": "npm run start --workspace=wporg-pattern-directory", "start:theme": "npm run start --workspace=wporg-pattern-directory-2024-theme", "setup:tools": "echo \"Not used.\"", @@ -25,7 +24,6 @@ "test:php": "wp-env run tests-cli --env-cwd=/var/www/html/ ./vendor/bin/phpunit -c wp-content/tests/phpunit/phpunit.xml" }, "workspaces": [ - "public_html/wp-content/plugins/pattern-creator", "public_html/wp-content/plugins/pattern-directory", "public_html/wp-content/themes/wporg-pattern-directory-2024" ] diff --git a/public_html/wp-content/plugins/pattern-creator/jest.config.js b/public_html/wp-content/plugins/pattern-creator/jest.config.js deleted file mode 100644 index bb260342c..000000000 --- a/public_html/wp-content/plugins/pattern-creator/jest.config.js +++ /dev/null @@ -1,14 +0,0 @@ -const defaultConfig = require( '@wordpress/scripts/config/jest-unit.config' ); - -const config = { - ...defaultConfig, - moduleNameMapper: { - ...defaultConfig.moduleNameMapper, - // Force module uuid to resolve with the CJS entry point, because - // Jest does not support package.json.exports. - // See https://github.com/uuidjs/uuid/issues/451 - uuid: require.resolve( 'uuid' ), - }, -}; - -module.exports = config; diff --git a/public_html/wp-content/plugins/pattern-creator/package.json b/public_html/wp-content/plugins/pattern-creator/package.json deleted file mode 100644 index d5736fc1f..000000000 --- a/public_html/wp-content/plugins/pattern-creator/package.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "name": "wporg-pattern-creator", - "version": "1.0.0", - "description": "Create block patterns on the frontend of a site.", - "author": "The WordPress Meta Team", - "license": "GPL-2.0-or-later", - "scripts": { - "build": "wp-scripts build", - "dev": "NODE_ENV=development wp-scripts build", - "format:js": "wp-scripts format src -- --config=../../../../.prettierrc.js", - "lint:css": "wp-scripts lint-style 'style.css' 'src/**/*.scss'", - "lint:js": "wp-scripts lint-js src", - "start": "wp-scripts start", - "test:unit": "wp-scripts test-unit-js" - }, - "devDependencies": { - "@wordpress/dependency-extraction-webpack-plugin": "5.2.0", - "@wordpress/scripts": "27.2.0", - "autoprefixer": "10.4.17", - "deep-freeze": "0.0.1", - "postcss-custom-properties": "13.3.4" - }, - "dependencies": { - "@wordpress/a11y": "4.14.0", - "@wordpress/api-fetch": "7.14.0", - "@wordpress/block-editor": "14.9.0", - "@wordpress/block-library": "9.14.0", - "@wordpress/blocks": "14.3.0", - "@wordpress/components": "29.0.0", - "@wordpress/compose": "7.14.0", - "@wordpress/core-data": "7.14.0", - "@wordpress/data": "10.14.0", - "@wordpress/dom-ready": "4.14.0", - "@wordpress/edit-post": "8.14.0", - "@wordpress/editor": "14.14.0", - "@wordpress/element": "6.14.0", - "@wordpress/format-library": "5.14.0", - "@wordpress/hooks": "4.14.0", - "@wordpress/i18n": "5.14.0", - "@wordpress/icons": "10.14.0", - "@wordpress/interface": "8.3.0", - "@wordpress/keyboard-shortcuts": "5.14.0", - "@wordpress/keycodes": "4.14.0", - "@wordpress/notices": "5.14.0", - "@wordpress/plugins": "7.14.0", - "@wordpress/primitives": "4.14.0", - "@wordpress/url": "4.14.0", - "classnames": "2.5.1", - "lodash": "4.17.21", - "rememo": "4.0.2" - }, - "eslintConfig": { - "extends": "../../../../.eslintrc.js", - "globals": { - "wporgBlockPattern": "readonly", - "wporgLocale": "readonly" - } - }, - "stylelint": { - "extends": "../../../../.stylelintrc" - } -} diff --git a/public_html/wp-content/plugins/pattern-creator/pattern-creator.php b/public_html/wp-content/plugins/pattern-creator/pattern-creator.php deleted file mode 100644 index 33c1f45be..000000000 --- a/public_html/wp-content/plugins/pattern-creator/pattern-creator.php +++ /dev/null @@ -1,337 +0,0 @@ -is_singular( POST_TYPE ) && false !== $wp_query->get( IS_EDIT_VAR, false ); - $is_new = is_page( 'new-pattern' ); - return $is_editor || $is_new; -} - -/** - * Returns whether the pattern is being edited - * - * @return boolean - */ -function is_editing_pattern() { - return '' !== get_query_var( PATTERN_ID_VAR ); -} - -/** - * Add our custom parameter to the list of public query variables. - * - * @param string[] $query_vars The array of allowed query variable names. - * @return stringp[] New query vars. - */ -function add_query_var( $query_vars ) { - $query_vars[] = IS_EDIT_VAR; - $query_vars[] = PATTERN_ID_VAR; - return $query_vars; -} -add_filter( 'query_vars', __NAMESPACE__ . '\add_query_var' ); - -/** - * Register & load the assets, initialize pattern creator. - * - * @throws \Error If the build files don't exist. - */ -function pattern_creator_init() { - global $editor_styles; - - if ( ! should_load_creator() ) { - return; - } - - if ( - ! ( is_editing_pattern() && current_user_can( 'edit_pattern', get_query_var( PATTERN_ID_VAR ) ) ) && - ! ( ! is_editing_pattern() && is_user_logged_in() ) - ) { - return; - } - - wp_deregister_style( 'wporg-style' ); - // These will have no effect if the styles are not registered. - wp_deregister_style( 'wporg-pattern-directory-2024-style' ); - wp_deregister_style( 'wporg-parent-2021-style' ); - wp_deregister_style( 'global-styles' ); - - $dir = dirname( __FILE__ ); - $script_asset_path = "$dir/build/index.asset.php"; - if ( ! file_exists( $script_asset_path ) ) { - throw new \Error( 'You need to run `npm run start:creator` or `npm run build:creator` for the Pattern Creator.' ); - } - - $script_asset = require( $script_asset_path ); - wp_enqueue_script( - 'wp-pattern-creator', - plugins_url( 'build/index.js', __FILE__ ), - $script_asset['dependencies'], - $script_asset['version'], - true - ); - wp_set_script_translations( 'wp-pattern-creator', 'wporg-patterns' ); - - wp_add_inline_script( - 'wp-pattern-creator', - sprintf( - "var wporgLocale = JSON.parse( decodeURIComponent( '%s' ) );", - rawurlencode( wp_json_encode( array( - 'id' => get_locale(), - 'displayName' => is_rosetta_site() ? get_rosetta_name() : '', - ) ) ), - ), - 'before' - ); - - wp_add_inline_script( - 'wp-pattern-creator', - sprintf( - 'var wporgBlockPattern = JSON.parse( decodeURIComponent( \'%s\' ) );', - rawurlencode( wp_json_encode( array( - 'siteUrl' => esc_url( home_url() ), - ) ) ) - ), - 'before' - ); - - wp_enqueue_style( - 'wp-pattern-creator', - plugins_url( 'build/style-index.css', __FILE__ ), - array( 'wp-components' ), - filemtime( "$dir/build/style-index.css" ) - ); - - /** Load in admin post functions for `get_default_post_to_edit`. */ - require_once ABSPATH . 'wp-admin/includes/post.php'; - - if ( is_singular( POST_TYPE ) || is_editing_pattern() ) { - $post_id = is_editing_pattern() ? $post_id = get_query_var( PATTERN_ID_VAR ) : get_the_ID(); - $post = get_post( $post_id ); - } else { - $post = get_default_post_to_edit( POST_TYPE, true ); - $post_id = $post->ID; - // Set up the default locale. - update_post_meta( $post_id, 'wpop_locale', 'en_US' ); - } - - add_filter( 'should_load_separate_core_block_assets', '__return_false', 100 ); - add_filter( 'template', __NAMESPACE__ . '\set_theme_twentytwentythree' ); - add_filter( 'stylesheet', __NAMESPACE__ . '\set_theme_twentytwentythree' ); - - $custom_settings = array( - 'postId' => $post_id, - 'siteUrl' => site_url(), - 'postsPerPage' => get_option( 'posts_per_page' ), - 'styles' => get_block_editor_theme_styles(), - '__experimentalBlockPatterns' => array(), - '__experimentalBlockPatternCategories' => array(), - ); - - wp_deregister_script( 'wporg-global-header-script' ); - - $editor_context = new WP_Block_Editor_Context( array( 'post' => $post ) ); - $settings = get_block_editor_settings( $custom_settings, $editor_context ); - - $settings['defaultStatus'] = get_option( 'wporg-pattern-default_status', 'publish' ); - - remove_filter( 'template', __NAMESPACE__ . '\set_theme_twentytwentythree' ); - remove_filter( 'stylesheet', __NAMESPACE__ . '\set_theme_twentytwentythree' ); - - gutenberg_initialize_editor( - 'block-pattern-creator', - 'pattern-creator', - array( - 'preload_paths' => array(), - 'initializer_name' => 'initialize', - 'editor_settings' => $settings, - ) - ); - - wp_add_inline_script( - 'wp-blocks', - sprintf( 'wp.blocks.setCategories( %s );', wp_json_encode( get_block_categories( $post ) ) ), - 'after' - ); - - wp_enqueue_script( 'wp-format-library' ); - wp_enqueue_style( 'wp-edit-site' ); - wp_enqueue_style( 'wp-format-library' ); - wp_enqueue_media(); -} -add_action( 'wp_enqueue_scripts', __NAMESPACE__ . '\pattern_creator_init', 20 ); - -/** - * Bypass WordPress template system to load only our editor app. - */ -function inject_editor_template( $template ) { - if ( should_load_creator() ) { - return __DIR__ . '/view/editor.php'; - } - return $template; -} -add_filter( 'template_include', __NAMESPACE__ . '\inject_editor_template' ); - -/** - * Add a rewrite rule to handle editing a pattern. - */ -function rewrite_for_pattern_editing() { - add_rewrite_rule( '^pattern/(\d+)/edit', 'index.php?pagename=new-pattern&' . PATTERN_ID_VAR . '=$matches[1]', 'top' ); -} -add_action( 'init', __NAMESPACE__ . '\rewrite_for_pattern_editing' ); - -/** - * Always disable the admin bar on the creator page. - * - * @param bool $show_admin_bar Whether the admin bar should be shown. Default false. - * @return bool Filtered value. - */ -function show_admin_bar( $show_admin_bar ) { - if ( ! should_load_creator() ) { - return $show_admin_bar; - } - - return false; -} -// Priority needs to be over 1000 to override `logged-out-admin-bar`. -add_filter( 'show_admin_bar', __NAMESPACE__ . '\show_admin_bar', 1001 ); - -/** - * Filter out `upload_files` from all non-admin users. - * - * @param bool[] $allcaps Array of key/value pairs where keys represent a capability name - * and boolean values represent whether the user has that capability. - */ -function disallow_uploads( $allcaps ) { - if ( ! isset( $allcaps['manage_options'] ) ) { - $allcaps['upload_files'] = false; - } - return $allcaps; -} -add_filter( 'user_has_cap', __NAMESPACE__ . '\disallow_uploads' ); - -/** - * Set up any custom endpoints. - */ -function rest_api_init() { - require_once __DIR__ . '/includes/openverse-client.php'; - require_once __DIR__ . '/includes/openverse-rest-controller.php'; - $controller = new \Openverse_REST_Controller(); - $controller->register_routes(); - - // Allow the post type labels through the `types` endpoint when viewing. - // This passes the value back to unauthenticated users, which prevents JS - // errors when the post-date block tries to use them. - register_rest_field( - 'type', // The object-type for the `types` endpoint. - 'labels', - array( - 'schema' => array( - 'description' => __( 'Human-readable labels for the post type for various contexts.', 'wporg-patterns' ), - 'type' => 'object', - 'context' => array( 'edit', 'view' ), - 'readonly' => true, - ), - ) - ); -} -add_action( 'rest_api_init', __NAMESPACE__ . '\rest_api_init' ); - -/** - * Return the appropriate theme slug for the current environment. - * - * @return string Theme slug. - */ -function set_theme_twentytwentythree() { - if ( 'local' === wp_get_environment_type() ) { - return 'twentytwentythree'; - } else { - return 'core/twentytwentythree'; - } -} - -/** - * Temporarily restore gutenberg_initialize_editor() for compat with Gutenberg 16.5.0 - * - * @see https://github.com/WordPress/pattern-directory/issues/601 - */ -function gutenberg_initialize_editor( $editor_name, $editor_script_handle, $settings ) { - - $defaults = array( - 'preload_paths' => array(), - 'initializer_name' => 'initialize', - 'editor_settings' => array(), - ); - - $settings = wp_parse_args( $settings, $defaults ); - - /** - * Preload common data by specifying an array of REST API paths that will be preloaded. - * - * Filters the array of paths that will be preloaded. - * - * @param string[] $preload_paths Array of paths to preload. - */ - $preload_paths = apply_filters( "{$editor_name}_preload_paths", $settings['preload_paths'] ); - - $preload_data = array_reduce( - $preload_paths, - 'rest_preload_api_request', - array() - ); - - wp_add_inline_script( - 'wp-api-fetch', - sprintf( - 'wp.apiFetch.use( wp.apiFetch.createPreloadingMiddleware( %s ) );', - wp_json_encode( $preload_data ) - ), - 'after' - ); - wp_add_inline_script( - "wp-{$editor_script_handle}", - sprintf( - 'wp.domReady( function() { - wp.%s.%s( "%s", %s ); - } );', - lcfirst( str_replace( '-', '', ucwords( $editor_script_handle, '-' ) ) ), - $settings['initializer_name'], - str_replace( '_', '-', $editor_name ), - wp_json_encode( $settings['editor_settings'] ) - ) - ); - - // Preload server-registered block schemas. - wp_add_inline_script( - 'wp-blocks', - 'wp.blocks.unstable__bootstrapServerSideBlockDefinitions(' . wp_json_encode( get_block_editor_server_block_settings() ) . ');' - ); -} diff --git a/public_html/wp-content/plugins/pattern-creator/postcss.config.js b/public_html/wp-content/plugins/pattern-creator/postcss.config.js deleted file mode 100644 index 4dc1f5191..000000000 --- a/public_html/wp-content/plugins/pattern-creator/postcss.config.js +++ /dev/null @@ -1,4 +0,0 @@ -module.exports = { - ident: 'postcss', - plugins: [ require( 'autoprefixer' )() ], -}; diff --git a/public_html/wp-content/plugins/pattern-creator/readme.md b/public_html/wp-content/plugins/pattern-creator/readme.md deleted file mode 100644 index 6cadca6fb..000000000 --- a/public_html/wp-content/plugins/pattern-creator/readme.md +++ /dev/null @@ -1,22 +0,0 @@ -# WordPress.org Block Pattern Creator - -This plugin adds an editor interface to the frontend of Block Pattern posts. - -## Requirements - -These should be available if you're using this environment. - -Plugins -- Gutenberg -- Pattern Directory - -Theme -- WordPress.org Pattern Directory (TBD) - -## Try it out - -See the [root Readme for dev environment info.](../../../../readme.md) - -Create some Block Patterns in wp-admin, `/wp-admin/post-new.php?post_type=wporg-pattern`. - -View a published pattern, if you're logged in you should see the pattern editor. Play around & save your pattern. diff --git a/public_html/wp-content/plugins/pattern-creator/src/api-middleware/filter-endpoints.js b/public_html/wp-content/plugins/pattern-creator/src/api-middleware/filter-endpoints.js deleted file mode 100644 index 3377eb795..000000000 --- a/public_html/wp-content/plugins/pattern-creator/src/api-middleware/filter-endpoints.js +++ /dev/null @@ -1,72 +0,0 @@ -/** - * Update the `context` query parameter to view for a set of endpoints. - * - * @param {string} path The endpoint path (possibly with a query string). - * @return {string} The path with the updated context. - */ -function maybeUpdateContext( path ) { - if ( ! path.includes( 'context=' ) ) { - return path; - } - - const endpointRegexes = [ - // All post endpoints. - /^\/wp\/v2\/posts/, - /^\/wp\/v2\/blocks/, - /^\/wp\/v2\/tags/, - /^\/wp\/v2\/categories/, - // Category and tag taxonomies. - /^\/wp\/v2\/taxonomies\/(category|post_tag)/, - // All post type endpoints except `wporg-pattern`, which needs to keep the `edit` context. - /^\/wp\/v2\/types(?!\/wporg-pattern)/, - ]; - - if ( endpointRegexes.some( ( regex ) => regex.test( path ) ) ) { - return path.replace( 'context=edit', 'context=view' ); - } - - return path; -} - -// Use a middleware provider to intercept and modify API calls. -// Short-circuit POST requests, bound queries, allow media, etc. -export default async function ( options, next ) { - if ( options.path ) { - // Add limits to all GET queries which attempt unbound queries - options.path = options.path.replace( 'per_page=-1', 'per_page=50' ); - - options.path = maybeUpdateContext( options.path ); - } - - // Wait to get the API response back, so it can be filtered. - const response = await next( options ); - - if ( options.path ) { - if ( options.path.includes( '/wp/v2/types?' ) ) { - // Set posts to viewable, but pages and patterns are not viewable. - // This controls whether these post-types are options in the Query - // Loop block. Pages are disabled because a regular user trying to - // access pages results in a `403` error. Patterns are disabled - // because they won't exist on other sites. - if ( response.post ) { - response.post.viewable = true; - } - if ( response.page ) { - response.page.viewable = false; - } - if ( response[ 'wporg-pattern' ] ) { - response[ 'wporg-pattern' ].viewable = false; - } - } else if ( options.path.includes( '/wp/v2/posts' ) ) { - response.forEach( ( post, index ) => { - if ( post.content && ! post.content.raw ) { - const content = post.content.rendered || ''; - post.content.raw = content; - } - response[ index ] = post; - } ); - } - } - - return response; -} diff --git a/public_html/wp-content/plugins/pattern-creator/src/api-middleware/index.js b/public_html/wp-content/plugins/pattern-creator/src/api-middleware/index.js deleted file mode 100644 index f39514a21..000000000 --- a/public_html/wp-content/plugins/pattern-creator/src/api-middleware/index.js +++ /dev/null @@ -1,14 +0,0 @@ -/** - * WordPress dependencies - */ -import apiFetch from '@wordpress/api-fetch'; - -/** - * Internal dependencies - */ -import filterEndpoints from './filter-endpoints'; -import mockSiteData from './mock-site-data'; - -// Set up API middleware. -apiFetch.use( filterEndpoints ); -apiFetch.use( mockSiteData ); diff --git a/public_html/wp-content/plugins/pattern-creator/src/api-middleware/mock-site-data.js b/public_html/wp-content/plugins/pattern-creator/src/api-middleware/mock-site-data.js deleted file mode 100644 index 0265d4d2f..000000000 --- a/public_html/wp-content/plugins/pattern-creator/src/api-middleware/mock-site-data.js +++ /dev/null @@ -1,35 +0,0 @@ -/** - * WordPress dependencies - */ -import { __ } from '@wordpress/i18n'; -import apiFetch from '@wordpress/api-fetch'; - -export default apiFetch.createPreloadingMiddleware( { - '/?_fields=description,gmt_offset,home,name,site_icon,site_icon_url,site_logo,timezone_string,url': { - body: { - // Set up default values for use in site-* blocks (site-title, - // site-tagline, site-logo). These placeholders should be the same - // as content returned in `includes/mock-blocks.php`. - name: __( 'Site Title placeholder', 'wporg-patterns' ), - description: __( 'Site Tagline placeholder', 'wporg-patterns' ), - url: 'https://wordpress.org/patterns', - home: 'https://wordpress.org/patterns', - gmt_offset: '0', - timezone_string: '', - // Technically this should be an int (ID), but it's not validated - // since the API reponse is preloaded below. Using "logo" to avoid - // collision with a real media item. - site_logo: 'logo', - site_icon: 0, - site_icon_url: 'https://s.w.org/images/wmark.png', - }, - }, - // Replace the custom logo output with the WordPress W. - '/wp/v2/media/logo?context=view': { - body: { - id: 'logo', - alt_text: __( 'Site logo', 'wporg-patterns' ), - source_url: 'https://s.w.org/images/wmark.png', - }, - }, -} ); diff --git a/public_html/wp-content/plugins/pattern-creator/src/components/block-editor/index.js b/public_html/wp-content/plugins/pattern-creator/src/components/block-editor/index.js deleted file mode 100644 index 0724b0a2f..000000000 --- a/public_html/wp-content/plugins/pattern-creator/src/components/block-editor/index.js +++ /dev/null @@ -1,88 +0,0 @@ -/** - * WordPress dependencies - */ -import { useSelect } from '@wordpress/data'; -import { useRef } from '@wordpress/element'; -import { useEntityBlockEditor } from '@wordpress/core-data'; -/* eslint-disable @wordpress/no-unsafe-wp-apis */ -import { - BlockEditorProvider, - BlockInspector, - BlockList, - BlockTools, - __unstableEditorStyles as EditorStyles, - __unstableIframe as Iframe, - privateApis as blockEditorPrivateApis, - __unstableUseMouseMoveTypingReset as useMouseMoveTypingReset, - __experimentalUseResizeCanvas as useResizeCanvas, - useSettings, - __unstableUseTypingObserver as useTypingObserver, -} from '@wordpress/block-editor'; -/* eslint-enable @wordpress/no-unsafe-wp-apis */ -import { PostTitle, VisualEditorGlobalKeyboardShortcuts } from '@wordpress/editor'; -import { useMergeRefs } from '@wordpress/compose'; - -/** - * Internal dependencies - */ -import { POST_TYPE, store as patternStore } from '../../store'; -import { SidebarInspectorFill } from '../sidebar'; -import { unlock } from '../../lock-unlock'; - -const { LayoutStyle } = unlock( blockEditorPrivateApis ); - -export default function BlockEditor( { setIsInserterOpen } ) { - const { settings, deviceType } = useSelect( - ( select ) => { - const { getSettings, getPreviewDeviceType } = select( patternStore ); - return { - settings: getSettings( setIsInserterOpen ), - deviceType: getPreviewDeviceType(), - }; - }, - [ setIsInserterOpen ] - ); - const [ layout ] = useSettings( 'layout' ); - const [ blocks, onInput, onChange ] = useEntityBlockEditor( 'postType', POST_TYPE ); - const resizedCanvasStyles = useResizeCanvas( deviceType, true ); - const ref = useMouseMoveTypingReset(); - const contentRef = useRef(); - const mergedRefs = useMergeRefs( [ contentRef, useTypingObserver() ] ); - - return ( - - - - - - -
- -
- -
-
- ); -} diff --git a/public_html/wp-content/plugins/pattern-creator/src/components/block-editor/style.scss b/public_html/wp-content/plugins/pattern-creator/src/components/block-editor/style.scss deleted file mode 100644 index 6f9bbee62..000000000 --- a/public_html/wp-content/plugins/pattern-creator/src/components/block-editor/style.scss +++ /dev/null @@ -1,27 +0,0 @@ -// The button element easily inherits styles that are meant for the editor style. -// These rules enhance the specificity to reduce that inheritance. -// This is duplicated in visual-editor. -.pattern-block-editor__editor-styles-wrapper .components-button { - font-family: $default-font; - font-size: $default-font-size; - padding: 6px 12px; - - &.is-tertiary, - &.has-icon { - padding: 6px; - } -} - -.pattern-visual-editor__post-title-wrapper { - max-width: 960px; - margin-left: auto; - margin-right: auto; - - h1 { - color: $white; - } -} - -.pattern-visual-editor > [name="editor-canvas"] { - margin-top: 0 !important; -} diff --git a/public_html/wp-content/plugins/pattern-creator/src/components/editor/index.js b/public_html/wp-content/plugins/pattern-creator/src/components/editor/index.js deleted file mode 100644 index 3b8e81d52..000000000 --- a/public_html/wp-content/plugins/pattern-creator/src/components/editor/index.js +++ /dev/null @@ -1,141 +0,0 @@ -/** - * WordPress dependencies - */ -import { __ } from '@wordpress/i18n'; -import { useDispatch, useSelect } from '@wordpress/data'; -import { BlockBreadcrumb } from '@wordpress/block-editor'; -import { useCallback, useEffect, useState } from '@wordpress/element'; -import { - ComplementaryArea, - FullscreenMode, - InterfaceSkeleton, - store as interfaceStore, -} from '@wordpress/interface'; -import { store as coreStore } from '@wordpress/core-data'; -import { store as noticesStore } from '@wordpress/notices'; -import { - EditorNotices, - EditorProvider, - EditorSnackbars, - ErrorBoundary, - UnsavedChangesWarning, -} from '@wordpress/editor'; -import { Notice, Popover, SlotFillProvider } from '@wordpress/components'; -import { ShortcutProvider } from '@wordpress/keyboard-shortcuts'; - -/** - * Internal dependencies - */ -import BlockEditor from '../block-editor'; -import EntitiesSavedStates from './save-sidebar'; -import Header from '../header'; -import InserterSidebar from '../secondary-sidebar/inserter-sidebar'; -import KeyboardShortcuts from '../keyboard-shortcuts'; -import ListViewSidebar from '../secondary-sidebar/list-view-sidebar'; -import { POST_TYPE, store as patternStore } from '../../store'; -import { SidebarComplementaryAreaFills } from '../sidebar'; -import { STORE_NAME } from '../../store/constants'; -import UrlController from '../url-controller'; -import WelcomeGuide from '../welcome-guide'; - -const interfaceLabels = { - secondarySidebar: __( 'Block Library', 'wporg-patterns' ), - actions: __( 'Editor publish', 'wporg-patterns' ), -}; - -function Editor( { onError, postId } ) { - const { isInserterOpen, isListViewOpen, post, sidebarIsOpened, settings } = useSelect( ( select ) => { - const { isInserterOpened, isListViewOpened, getSettings } = select( patternStore ); - const { getEntityRecord } = select( coreStore ); - - return { - isInserterOpen: isInserterOpened(), - isListViewOpen: isListViewOpened(), - post: getEntityRecord( 'postType', POST_TYPE, postId ), - sidebarIsOpened: !! select( interfaceStore ).getActiveComplementaryArea( STORE_NAME ), - settings: getSettings(), - }; - }, [] ); - const { setIsInserterOpened } = useDispatch( patternStore ); - const { createInfoNotice } = useDispatch( noticesStore ); - const [ isEntitiesSavedStatesOpen, setIsEntitiesSavedStatesOpen ] = useState( false ); - const closeEntitiesSavedStates = useCallback( () => { - setIsEntitiesSavedStatesOpen( false ); - }, [] ); - const openEntitiesSavedStates = useCallback( () => { - setIsEntitiesSavedStatesOpen( true ); - }, [] ); - - useEffect( () => { - if ( ! wporgLocale.id.startsWith( 'en_' ) ) { - createInfoNotice( __( 'Patterns should be submitted in English.', 'wporg-patterns' ), { - isDismissible: false, - } ); - } - }, [] ); - - // Don't render the Editor until the settings are set and loaded - if ( ! settings?.siteUrl || ! post ) { - return null; - } - - const secondarySidebar = () => { - if ( isInserterOpen ) { - return ; - } - if ( isListViewOpen ) { - return ; - } - return null; - }; - - return ( - - - - - - - - - - } - header={
} - notices={ } - content={ - <> - - - { ! postId && ( - - { __( - "You attempted to edit an item that doesn't exist. Perhaps it was deleted?", - 'wporg-patterns' - ) } - - ) } - - - } - actions={ - - } - footer={ } - /> - - - - - - - ); -} -export default Editor; diff --git a/public_html/wp-content/plugins/pattern-creator/src/components/editor/save-sidebar.js b/public_html/wp-content/plugins/pattern-creator/src/components/editor/save-sidebar.js deleted file mode 100644 index 290f18a05..000000000 --- a/public_html/wp-content/plugins/pattern-creator/src/components/editor/save-sidebar.js +++ /dev/null @@ -1,46 +0,0 @@ -/** - * WordPress dependencies - */ -import { Button, createSlotFill } from '@wordpress/components'; -import { EntitiesSavedStates, PostPublishPanel } from '@wordpress/editor'; -import { __ } from '@wordpress/i18n'; - -// @todo bring back pre/post publish plugin slots. - -const { Fill, Slot } = createSlotFill( 'ActionsPanel' ); - -export const ActionsPanelFill = Fill; - -export default function ActionsPanel( { - closeEntitiesSavedStates, - openEntitiesSavedStates, - isEntitiesSavedStatesOpen, -} ) { - let unmountableContent; - if ( isEntitiesSavedStatesOpen ) { - unmountableContent = ; - } else { - unmountableContent = ( -
- -
- ); - } - - // Since EntitiesSavedStates controls its own panel, we can keep it - // always mounted to retain its own component state (such as checkboxes). - return ( - <> - { isEntitiesSavedStatesOpen && } - - { ! isEntitiesSavedStatesOpen && unmountableContent } - - ); -} diff --git a/public_html/wp-content/plugins/pattern-creator/src/components/editor/style.scss b/public_html/wp-content/plugins/pattern-creator/src/components/editor/style.scss deleted file mode 100644 index b8d66cf3b..000000000 --- a/public_html/wp-content/plugins/pattern-creator/src/components/editor/style.scss +++ /dev/null @@ -1,48 +0,0 @@ -// Unset the top spacing to avoid misaligning the creator UI. -html { - margin-top: 0 !important; - scroll-padding-top: 0 !important; -} - -// Push the global header & footer behind the creator UI. -.wp-block-group.global-footer, -.wp-block-group.global-header { - position: relative !important; - z-index: -1 !important; -} - -// Hide the footer to prevent vertical scroll bar. -.wp-block-group.global-footer { - display: none; -} - -.pattern-interface { - // This should always be 0, because we never have an admin bar to contend with. - top: 0 !important; - z-index: 1; -} - -.pattern-visual-editor { - position: relative; - height: 100%; - display: flex; - flex-flow: column; - background: $gray-800; - - iframe { - display: block; - width: 100%; - height: 100%; - background-color: $white; - } -} - -// Adjust the position of the notices -.pattern .components-editor-notices__snackbar { - position: fixed; - left: 0; - right: 0; - bottom: 40px; - padding-left: 16px; - padding-right: 16px; -} diff --git a/public_html/wp-content/plugins/pattern-creator/src/components/header/feature-toggle/index.js b/public_html/wp-content/plugins/pattern-creator/src/components/header/feature-toggle/index.js deleted file mode 100644 index 96b893d88..000000000 --- a/public_html/wp-content/plugins/pattern-creator/src/components/header/feature-toggle/index.js +++ /dev/null @@ -1,46 +0,0 @@ -/** - * External dependencies - */ -import { flow } from 'lodash'; - -/** - * WordPress dependencies - */ -import { useDispatch, useSelect } from '@wordpress/data'; -import { MenuItem } from '@wordpress/components'; -import { __ } from '@wordpress/i18n'; -import { check } from '@wordpress/icons'; -import { speak } from '@wordpress/a11y'; - -/** - * Internal dependencies - */ -import { store as patternStore } from '../../../store'; - -export default function FeatureToggle( { feature, label, info, messageActivated, messageDeactivated } ) { - const speakMessage = () => { - if ( isActive ) { - speak( messageDeactivated || __( 'Feature deactivated', 'wporg-patterns' ) ); - } else { - speak( messageActivated || __( 'Feature activated', 'wporg-patterns' ) ); - } - }; - - const isActive = useSelect( ( select ) => { - return select( patternStore ).isFeatureActive( feature ); - }, [] ); - - const { toggleFeature } = useDispatch( patternStore ); - - return ( - - { label } - - ); -} diff --git a/public_html/wp-content/plugins/pattern-creator/src/components/header/index.js b/public_html/wp-content/plugins/pattern-creator/src/components/header/index.js deleted file mode 100644 index 337181184..000000000 --- a/public_html/wp-content/plugins/pattern-creator/src/components/header/index.js +++ /dev/null @@ -1,119 +0,0 @@ -/** - * External dependencies - */ -import classnames from 'classnames'; - -/** - * WordPress dependencies - */ -import { __, _x } from '@wordpress/i18n'; -import { ToolSelector } from '@wordpress/block-editor'; -import { Button, VisuallyHidden } from '@wordpress/components'; -import { Icon, arrowLeft, listView, plus } from '@wordpress/icons'; -import { PinnedItems } from '@wordpress/interface'; -import { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts'; -import { useCallback, useRef } from '@wordpress/element'; -import { useDispatch, useSelect } from '@wordpress/data'; -import { useViewportMatch } from '@wordpress/compose'; - -/** - * Internal dependencies - */ -import MoreMenu from './more-menu'; -import RedoButton from './undo-redo/redo'; -import { SaveButton, SaveDraftButton } from '../save-button'; -import { store as patternStore } from '../../store'; -import UndoButton from './undo-redo/undo'; - -const preventDefault = ( event ) => { - event.preventDefault(); -}; - -export default function Header() { - const inserterButton = useRef(); - const { hasReducedUI, isInserterOpen, isListViewOpen, listViewShortcut } = useSelect( ( select ) => { - const { isFeatureActive, isInserterOpened, isListViewOpened } = select( patternStore ); - const { getShortcutRepresentation } = select( keyboardShortcutsStore ); - - return { - hasReducedUI: isFeatureActive( 'reducedUI' ), - isInserterOpen: isInserterOpened(), - isListViewOpen: isListViewOpened(), - listViewShortcut: getShortcutRepresentation( 'core/edit-site/toggle-list-view' ), - }; - }, [] ); - - const { setIsInserterOpened, setIsListViewOpened } = useDispatch( patternStore ); - - const isLargeViewport = useViewportMatch( 'medium' ); - - const openInserter = useCallback( () => { - if ( isInserterOpen ) { - // Focusing the inserter button closes the inserter popover - inserterButton.current.focus(); - } else { - setIsInserterOpened( true ); - } - }, [ isInserterOpen, setIsInserterOpened ] ); - - const toggleListView = useCallback( - () => setIsListViewOpened( ! isListViewOpen ), - [ setIsListViewOpened, isListViewOpen ] - ); - - const classes = classnames( 'pattern-header', { - 'has-reduced-ui': hasReducedUI, - } ); - - return ( -
-
- - - { __( 'Pattern Directory', 'wporg-patterns' ) } - -
-
-
- -
-
- - - - -
-
-
- ); -} diff --git a/public_html/wp-content/plugins/pattern-creator/src/components/header/more-menu/index.js b/public_html/wp-content/plugins/pattern-creator/src/components/header/more-menu/index.js deleted file mode 100644 index e1eea6fb2..000000000 --- a/public_html/wp-content/plugins/pattern-creator/src/components/header/more-menu/index.js +++ /dev/null @@ -1,70 +0,0 @@ -/** - * WordPress dependencies - */ -import { __, _x } from '@wordpress/i18n'; -import { moreVertical } from '@wordpress/icons'; -import { DropdownMenu, MenuGroup } from '@wordpress/components'; -import { ActionItem } from '@wordpress/interface'; - -/** - * Internal dependencies - */ -import FeatureToggle from '../feature-toggle'; -import ToolsMoreMenuGroup from '../tools-more-menu-group'; - -const POPOVER_PROPS = { - className: 'pattern-more-menu__content', - position: 'bottom left', -}; -const TOGGLE_PROPS = { - tooltipPosition: 'bottom', -}; - -const MoreMenu = () => ( - - { ( { onClose } ) => ( - <> - - - - - - - - - - ) } - -); - -export default MoreMenu; diff --git a/public_html/wp-content/plugins/pattern-creator/src/components/header/more-menu/style.scss b/public_html/wp-content/plugins/pattern-creator/src/components/header/more-menu/style.scss deleted file mode 100644 index 423f6048b..000000000 --- a/public_html/wp-content/plugins/pattern-creator/src/components/header/more-menu/style.scss +++ /dev/null @@ -1,29 +0,0 @@ -.pattern-more-menu { - margin-left: -4px; - - // the padding and margin of the more menu is intentionally non-standard - .components-button { - width: auto; - padding: 0 2px; - } - - @include break-small() { - margin-left: 4px; - - .components-button { - padding: 0 4px; - } - } -} - -.pattern-more-menu__content .components-popover__content { - min-width: 260px; - - .components-dropdown-menu__menu { - padding: 0; - } -} - -.components-popover.pattern-more-menu__content { - z-index: z-index(".components-popover.interface-more-menu__content"); -} diff --git a/public_html/wp-content/plugins/pattern-creator/src/components/header/style.scss b/public_html/wp-content/plugins/pattern-creator/src/components/header/style.scss deleted file mode 100644 index c257ba65a..000000000 --- a/public_html/wp-content/plugins/pattern-creator/src/components/header/style.scss +++ /dev/null @@ -1,232 +0,0 @@ -$header-toolbar-min-width: 335px; - -.pattern-header { - align-items: center; - background-color: $white; - display: flex; - height: $header-height; - box-sizing: border-box; - width: 100%; - justify-content: space-between; - - .pattern-header_start, - .pattern-header_end { - display: flex; - } - - .pattern-header_center { - display: flex; - align-items: center; - height: 100%; - // Flex items will, by default, refuse to shrink below a minimum - // intrinsic width. In order to shrink this flexbox item, and - // subsequently truncate child text, we set an explicit min-width. - // See https://dev.w3.org/csswg/css-flexbox/#min-size-auto - min-width: 0; - } - - .pattern-header_end { - justify-content: flex-end; - } -} - -// Keeps the document title centered when the sidebar is open -body.is-navigation-sidebar-open { - .pattern-header { - padding-left: 0; - transition: padding-left 20ms linear; - transition-delay: 0ms; - - @include reduce-motion("transition"); - } -} - -// Centred document title on small screens with sidebar open -@media ( max-width: #{ ($break-large - 1) } ) { - body.is-navigation-sidebar-open .pattern-header { - .pattern-header-toolbar__inserter-toggle ~ .components-button, - .pattern-header_end .components-button:not(.is-primary) { - display: none; - } - - .pattern-save-button__button { - margin-right: 0; - } - } -} - -.pattern-header__toolbar { - display: flex; - align-items: center; - padding-left: $grid-unit-10; - - @include break-small() { - padding-left: $grid-unit-30; - } - - @include break-wide() { - padding-right: $grid-unit-10; - } - - .pattern-header-toolbar__inserter-toggle { - margin-right: $grid-unit-10; - min-width: $grid-unit-40; - width: $grid-unit-40; - height: $grid-unit-40; - padding: 0; - - svg { - transition: transform cubic-bezier(0.165, 0.84, 0.44, 1) 0.2s; - - @include reduce-motion("transition"); - } - - &.is-pressed { - svg { - transform: rotate(45deg); - } - } - } -} - -.pattern-header__toolbar-switchers { - align-items: center; - display: flex; -} - -.pattern-header__toolbar-switchers-separator { - margin: 0 -6px 0; -} - -/** - * Buttons in the Toolbar - */ - -.pattern-header__actions { - display: inline-flex; - align-items: center; - flex-wrap: wrap; - padding-right: $grid-unit-05; - - .interface-pinned-items { - display: none; - - @include break-medium() { - display: inline-flex; - } - } - - // Adjust button paddings to scale better to mobile. - .editor-post-saved-state, - .components-button.components-button { - margin-right: $grid-unit-05; - - @include break-small() { - margin-right: $grid-unit-15; - } - } - - .editor-post-saved-state, - .components-button.is-tertiary { - padding: 0 #{$grid-unit-15 * 0.5}; - } - - .pattern-more-menu .components-button, - .interface-pinned-items .components-button { - margin-right: 0; - } - - @include break-small() { - padding-right: $grid-unit-20; - } -} - -.main-dashboard-button { - display: flex; - align-items: center; - align-self: stretch; - justify-content: center; - border: none; - background: $gray-900; - color: $white; - fill: currentColor; - border-radius: 0; - height: $header-height + $border-width; - width: $header-height; - position: relative; - margin-bottom: - $border-width; - - &:hover, - &:active, - &:visited { - color: $white; - } - - &:focus { - box-shadow: none; - } - - &::before { - transition: box-shadow 0.1s ease; - - @include reduce-motion("transition"); - content: ""; - display: block; - position: absolute; - top: 9px; - right: 9px; - bottom: 9px; - left: 9px; - border-radius: $radius-block-ui + $border-width + $border-width; - box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) $gray-900; - } - - // Hover color. - &:hover::before { - box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) $gray-700; - } - - // Lightened spot color focus. - &:focus::before { - box-shadow: - inset 0 0 0 var(--wp-admin-border-width-focus) rgba($white, 0.1), - inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color); - } -} - -.pattern-header.has-reduced-ui { - - @include break-small () { - // Apply transition to every button but the first one. - .pattern-header__toolbar > * + .components-button, - .pattern-header__toolbar > * + .components-dropdown > [aria-expanded="false"] { - transition: opacity 0.1s linear; - - @include reduce-motion("transition"); - } - - // Zero out opacity unless hovered. - &:not(:hover) .pattern-header__toolbar > * + .components-button, - &:not(:hover) .pattern-header__toolbar > * + .components-dropdown > [aria-expanded="false"] { - opacity: 0; - } - } -} - -.pattern-header__actions-more-menu { - margin-left: -4px; - - // The padding and margin of the more menu is intentionally non-standard. - .components-icon-button { - padding: 8px 2px; - width: auto; - } - - @include break-small() { - margin-left: 4px; - - .components-icon-button { - padding: 8px 4px; - } - } -} diff --git a/public_html/wp-content/plugins/pattern-creator/src/components/header/tools-more-menu-group/index.js b/public_html/wp-content/plugins/pattern-creator/src/components/header/tools-more-menu-group/index.js deleted file mode 100644 index 6de5bbd5c..000000000 --- a/public_html/wp-content/plugins/pattern-creator/src/components/header/tools-more-menu-group/index.js +++ /dev/null @@ -1,22 +0,0 @@ -/** - * External dependencies - */ -import { isEmpty } from 'lodash'; - -/** - * WordPress dependencies - */ -import { MenuGroup, createSlotFill } from '@wordpress/components'; -import { __ } from '@wordpress/i18n'; - -const { Fill: ToolsMoreMenuGroup, Slot } = createSlotFill( 'ToolsMoreMenuGroup' ); - -ToolsMoreMenuGroup.Slot = ( { fillProps } ) => ( - - { ( fills ) => - ! isEmpty( fills ) && { fills } - } - -); - -export default ToolsMoreMenuGroup; diff --git a/public_html/wp-content/plugins/pattern-creator/src/components/header/undo-redo/redo.js b/public_html/wp-content/plugins/pattern-creator/src/components/header/undo-redo/redo.js deleted file mode 100644 index c724c62a9..000000000 --- a/public_html/wp-content/plugins/pattern-creator/src/components/header/undo-redo/redo.js +++ /dev/null @@ -1,26 +0,0 @@ -/** - * WordPress dependencies - */ -import { __, isRTL } from '@wordpress/i18n'; -import { Button } from '@wordpress/components'; -import { useDispatch, useSelect } from '@wordpress/data'; -import { redo as redoIcon, undo as undoIcon } from '@wordpress/icons'; -import { displayShortcut } from '@wordpress/keycodes'; -import { store as coreStore } from '@wordpress/core-data'; - -export default function RedoButton() { - const hasRedo = useSelect( ( select ) => select( coreStore ).hasRedo() ); - const { redo } = useDispatch( coreStore ); - return ( - - - ); -} diff --git a/public_html/wp-content/plugins/pattern-creator/src/components/save-button/index.js b/public_html/wp-content/plugins/pattern-creator/src/components/save-button/index.js deleted file mode 100644 index ac33f1bca..000000000 --- a/public_html/wp-content/plugins/pattern-creator/src/components/save-button/index.js +++ /dev/null @@ -1,99 +0,0 @@ -/** - * External dependencies - */ -import { get } from 'lodash'; - -/** - * WordPress dependencies - */ -import { __ } from '@wordpress/i18n'; -import { Button } from '@wordpress/components'; -import { store as coreStore } from '@wordpress/core-data'; -import { store as editorStore } from '@wordpress/editor'; -import { useDispatch, useSelect } from '@wordpress/data'; -import { useState } from '@wordpress/element'; - -/** - * Internal dependencies - */ -import SubmissionModal from '../submission-modal'; -import { store as patternStore } from '../../store'; - -export { default as SaveDraftButton } from './draft'; - -export function SaveButton() { - const { - currentStatus, - isDirty, - isSaving, - isAutoSaving, - isSaveable, - isPublished, - isPublishedOrPending, - publishStatus, - } = useSelect( ( select ) => { - const { __experimentalGetDirtyEntityRecords } = select( coreStore ); - const { isAutosavingPost, isSavingPost, getCurrentPost, getCurrentPostId } = select( editorStore ); - const { isPatternSaveable, getSettings } = select( patternStore ); - - const dirtyEntityRecords = __experimentalGetDirtyEntityRecords(); - const _isAutoSaving = isAutosavingPost(); - const _post = getCurrentPost(); - const hasPublishAction = get( _post, [ '_links', 'wp:action-publish' ], false ); - const settings = getSettings(); - return { - currentStatus: _post.status, - isDirty: dirtyEntityRecords.length > 0, - isSaving: isSavingPost() || _isAutoSaving, - isAutoSaving: _isAutoSaving, - isSaveable: isPatternSaveable( getCurrentPostId() ), - isPublished: 'publish' === _post.status, - isPublishedOrPending: [ 'pending', 'publish' ].includes( _post.status ), - publishStatus: hasPublishAction ? settings.defaultStatus : 'pending', - }; - } ); - const { editPost, savePost } = useDispatch( editorStore ); - const [ showModal, setShowModal ] = useState( false ); - - // Button is disabled when not saveable, when it's already saving, or if the draft post is not dirty. - // A draft post can be published without any local changes (the modal will catch if there is no content). - const isDisabled = ! isSaveable || isSaving || ( ! isDirty && isPublishedOrPending ); - - const onClick = () => { - if ( isDisabled ) { - return; - } - if ( isPublished ) { - onSuccess(); - } else { - setShowModal( true ); - } - }; - - const onSuccess = () => { - editPost( { status: publishStatus }, { undoIgnore: true } ); - savePost(); - }; - - return ( - <> - { showModal && ( - setShowModal( false ) } - onSubmit={ onSuccess } - status={ currentStatus } - /> - ) } - - - ); -} diff --git a/public_html/wp-content/plugins/pattern-creator/src/components/secondary-sidebar/inserter-sidebar.js b/public_html/wp-content/plugins/pattern-creator/src/components/secondary-sidebar/inserter-sidebar.js deleted file mode 100644 index ae8887fba..000000000 --- a/public_html/wp-content/plugins/pattern-creator/src/components/secondary-sidebar/inserter-sidebar.js +++ /dev/null @@ -1,42 +0,0 @@ -/** - * WordPress dependencies - */ -import { useDispatch, useSelect } from '@wordpress/data'; -import { Button } from '@wordpress/components'; -/* eslint-disable-next-line @wordpress/no-unsafe-wp-apis -- Experimental is OK. */ -import { __experimentalLibrary as Library } from '@wordpress/block-editor'; -import { close } from '@wordpress/icons'; -/* eslint-disable-next-line @wordpress/no-unsafe-wp-apis -- Experimental is OK. */ -import { __experimentalUseDialog as useDialog, useViewportMatch } from '@wordpress/compose'; - -/** - * Internal dependencies - */ -import { store as patternStore } from '../../store'; - -export default function InserterSidebar() { - const { setIsInserterOpened } = useDispatch( patternStore ); - const insertionPoint = useSelect( ( select ) => select( patternStore ).__experimentalGetInsertionPoint(), [] ); - - const isMobile = useViewportMatch( 'medium', '<' ); - const [ inserterDialogRef, inserterDialogProps ] = useDialog( { - onClose: () => setIsInserterOpened( false ), - } ); - - return ( -
-
-
-
- -
-
- ); -} diff --git a/public_html/wp-content/plugins/pattern-creator/src/components/secondary-sidebar/list-view-sidebar.js b/public_html/wp-content/plugins/pattern-creator/src/components/secondary-sidebar/list-view-sidebar.js deleted file mode 100644 index c44d46e85..000000000 --- a/public_html/wp-content/plugins/pattern-creator/src/components/secondary-sidebar/list-view-sidebar.js +++ /dev/null @@ -1,54 +0,0 @@ -/** - * WordPress dependencies - */ -/* eslint-disable-next-line @wordpress/no-unsafe-wp-apis -- Experimental is OK. */ -import { __experimentalListView as ListView } from '@wordpress/block-editor'; -import { Button } from '@wordpress/components'; -import { useFocusOnMount, useFocusReturn, useInstanceId, useMergeRefs } from '@wordpress/compose'; -import { useDispatch } from '@wordpress/data'; -import { __ } from '@wordpress/i18n'; -import { closeSmall } from '@wordpress/icons'; -import { ESCAPE } from '@wordpress/keycodes'; - -/** - * Internal dependencies - */ -import { store as patternStore } from '../../store'; - -// Forked from https://raw.githubusercontent.com/WordPress/gutenberg/1b9157577fce4133e9be89c1d89cdd02918f6ba3/packages/edit-site/src/components/secondary-sidebar/list-view-sidebar.js - -export default function ListViewSidebar() { - const { setIsListViewOpened } = useDispatch( patternStore ); - - const focusOnMountRef = useFocusOnMount( 'firstElement' ); - const headerFocusReturnRef = useFocusReturn(); - const contentFocusReturnRef = useFocusReturn(); - function closeOnEscape( event ) { - if ( event.keyCode === ESCAPE && ! event.defaultPrevented ) { - setIsListViewOpened( false ); - } - } - - const instanceId = useInstanceId( ListViewSidebar ); - const labelId = `pattern__list-view-panel-label-${ instanceId }`; - - return ( - // eslint-disable-next-line jsx-a11y/no-static-element-interactions -
-
- { __( 'List View', 'wporg-patterns' ) } -
-
- -
-
- ); -} diff --git a/public_html/wp-content/plugins/pattern-creator/src/components/secondary-sidebar/style.scss b/public_html/wp-content/plugins/pattern-creator/src/components/secondary-sidebar/style.scss deleted file mode 100644 index 9a76d2e9c..000000000 --- a/public_html/wp-content/plugins/pattern-creator/src/components/secondary-sidebar/style.scss +++ /dev/null @@ -1,52 +0,0 @@ -.pattern__inserter-panel, -.pattern__list-view-panel { - height: 100%; - display: flex; - flex-direction: column; -} - -.pattern__list-view-panel { - // Same width as the Inserter. - // @see packages/block-editor/src/components/inserter/style.scss - min-width: 350px; -} - -.pattern__inserter-panel-header { - padding-top: $grid-unit-10; - padding-right: $grid-unit-10; - display: flex; - justify-content: flex-end; - - @include break-medium() { - display: none; - } -} - -.pattern__inserter-panel-content, -.pattern__list-view-panel-content { - // Leave space for the close button - height: calc(100% - #{$button-size} - #{$grid-unit-10}); -} - - -.pattern__inserter-panel-content { - - @include break-medium() { - height: 100%; - } -} - -.pattern__list-view-panel-header { - align-items: center; - border-bottom: $border-width solid $gray-300; - display: flex; - justify-content: space-between; - height: $grid-unit-60; - padding-left: $grid-unit-20; - padding-right: $grid-unit-05; -} - -.pattern__list-view-panel-content { - overflow-y: auto; - padding: $grid-unit-10; -} diff --git a/public_html/wp-content/plugins/pattern-creator/src/components/sidebar/constants.js b/public_html/wp-content/plugins/pattern-creator/src/components/sidebar/constants.js deleted file mode 100644 index 71b52e6f7..000000000 --- a/public_html/wp-content/plugins/pattern-creator/src/components/sidebar/constants.js +++ /dev/null @@ -1,2 +0,0 @@ -export const SIDEBAR_PATTERN = 'pattern-creator/pattern'; -export const SIDEBAR_BLOCK = 'pattern-creator/block-inspector'; diff --git a/public_html/wp-content/plugins/pattern-creator/src/components/sidebar/default-sidebar.js b/public_html/wp-content/plugins/pattern-creator/src/components/sidebar/default-sidebar.js deleted file mode 100644 index e9258a96e..000000000 --- a/public_html/wp-content/plugins/pattern-creator/src/components/sidebar/default-sidebar.js +++ /dev/null @@ -1,40 +0,0 @@ -/** - * WordPress dependencies - */ -import { ComplementaryArea, ComplementaryAreaMoreMenuItem } from '@wordpress/interface'; - -/** - * Internal dependencies - */ -import { STORE_NAME } from '../../store/constants'; - -export default function DefaultSidebar( { - className, - identifier, - title, - icon, - children, - closeLabel, - header, - headerClassName, -} ) { - return ( - <> - - { children } - - - { title } - - - ); -} diff --git a/public_html/wp-content/plugins/pattern-creator/src/components/sidebar/index.js b/public_html/wp-content/plugins/pattern-creator/src/components/sidebar/index.js deleted file mode 100644 index c0fbf9831..000000000 --- a/public_html/wp-content/plugins/pattern-creator/src/components/sidebar/index.js +++ /dev/null @@ -1,67 +0,0 @@ -/** - * WordPress dependencies - */ -import { createSlotFill } from '@wordpress/components'; -import { __, isRTL } from '@wordpress/i18n'; -import { drawerLeft, drawerRight } from '@wordpress/icons'; -import { useEffect } from '@wordpress/element'; -import { useDispatch, useSelect } from '@wordpress/data'; -import { store as interfaceStore } from '@wordpress/interface'; -import { store as blockEditorStore } from '@wordpress/block-editor'; - -/** - * Internal dependencies - */ -import DefaultSidebar from './default-sidebar'; -import PatternSettings from './pattern-settings'; -import { STORE_NAME } from '../../store/constants'; -import SettingsHeader from './settings-header'; -import { SIDEBAR_BLOCK, SIDEBAR_PATTERN } from './constants'; - -const { Slot: InspectorSlot, Fill: InspectorFill } = createSlotFill( 'PatternSidebarInspector' ); -export const SidebarInspectorFill = InspectorFill; - -export function SidebarComplementaryAreaFills() { - const { sidebar, isEditorSidebarOpened, hasBlockSelection } = useSelect( ( select ) => { - const _sidebar = select( interfaceStore ).getActiveComplementaryArea( STORE_NAME ); - const _isEditorSidebarOpened = [ SIDEBAR_BLOCK, SIDEBAR_PATTERN ].includes( _sidebar ); - return { - sidebar: _sidebar, - isEditorSidebarOpened: _isEditorSidebarOpened, - hasBlockSelection: !! select( blockEditorStore ).getBlockSelectionStart(), - }; - }, [] ); - const { enableComplementaryArea } = useDispatch( interfaceStore ); - - useEffect( () => { - if ( ! isEditorSidebarOpened ) { - return; - } - if ( hasBlockSelection ) { - enableComplementaryArea( STORE_NAME, SIDEBAR_BLOCK ); - } else { - enableComplementaryArea( STORE_NAME, SIDEBAR_PATTERN ); - } - }, [ hasBlockSelection, isEditorSidebarOpened ] ); - - let sidebarName = sidebar; - if ( ! isEditorSidebarOpened ) { - sidebarName = hasBlockSelection ? SIDEBAR_BLOCK : SIDEBAR_PATTERN; - } - - return ( - <> - } - headerClassName="pattern-sidebar__panel-tabs" - > - { sidebar === SIDEBAR_PATTERN && } - { sidebar === SIDEBAR_BLOCK && } - - - ); -} diff --git a/public_html/wp-content/plugins/pattern-creator/src/components/sidebar/pattern-settings/index.js b/public_html/wp-content/plugins/pattern-creator/src/components/sidebar/pattern-settings/index.js deleted file mode 100644 index 724af1318..000000000 --- a/public_html/wp-content/plugins/pattern-creator/src/components/sidebar/pattern-settings/index.js +++ /dev/null @@ -1,109 +0,0 @@ -/** - * WordPress dependencies - */ -import { __ } from '@wordpress/i18n'; -import { - ExternalLink, - FormTokenField, - PanelBody, - PanelRow, - TextControl, - TextareaControl, -} from '@wordpress/components'; -import { store as editorStore } from '@wordpress/editor'; -import { useDispatch, useSelect } from '@wordpress/data'; -import { useCallback } from '@wordpress/element'; - -/** - * Internal dependencies - */ -import PatternCategoriesControl from '../../pattern-categories-control'; -import { KEYWORD_SLUG } from '../../../store'; - -const DESCRIPTION_SLUG = 'wpop_description'; - -function PatternSettings() { - const { description, keywords, link, meta, selectedCategories, status, title } = useSelect( ( select ) => { - const { getCurrentPost, getEditedPostAttribute } = select( editorStore ); - const _meta = getEditedPostAttribute( 'meta' ) || {}; - const _post = getCurrentPost(); - return { - description: _meta[ DESCRIPTION_SLUG ], - keywords: _meta[ KEYWORD_SLUG ].split( ', ' ).filter( ( item ) => item.length ), - link: _post.link, - meta: _meta, - selectedCategories: getEditedPostAttribute( 'pattern-categories' ), - status: _post.status, - title: getEditedPostAttribute( 'title' ) || '', - }; - } ); - - const { editPost } = useDispatch( editorStore ); - const setTitle = useCallback( ( value ) => { - editPost( { title: value } ); - } ); - const setDescription = useCallback( ( value ) => { - editPost( { meta: { ...meta, wpop_description: value } } ); - } ); - const setCategories = useCallback( ( value ) => { - editPost( { 'pattern-categories': value } ); - } ); - const setKeywords = useCallback( ( value ) => { - const keywordsString = value.join( ', ' ); - editPost( { meta: { ...meta, [ KEYWORD_SLUG ]: keywordsString } } ); - } ); - - return ( - <> - - - - - - - - { [ 'pending', 'publish' ].includes( status ) && ( -
-

- { __( 'View pattern', 'wporg-patterns' ) } -

- { link } -
- ) } -
- -

- { __( - 'Patterns are grouped into defined categories to help people browse.', - 'wporg-patterns' - ) } -

- -
- -

- { __( - 'Keywords are words or short phrases that will help people find your pattern. There is a maximum of 10 keywords.', - 'wporg-patterns' - ) } -

- -
- - ); -} - -export default PatternSettings; diff --git a/public_html/wp-content/plugins/pattern-creator/src/components/sidebar/settings-header/index.js b/public_html/wp-content/plugins/pattern-creator/src/components/sidebar/settings-header/index.js deleted file mode 100644 index a2552a5bd..000000000 --- a/public_html/wp-content/plugins/pattern-creator/src/components/sidebar/settings-header/index.js +++ /dev/null @@ -1,69 +0,0 @@ -/** - * WordPress dependencies - */ -import { Button } from '@wordpress/components'; -import { __ } from '@wordpress/i18n'; -import { useDispatch } from '@wordpress/data'; -import { store as interfaceStore } from '@wordpress/interface'; - -/** - * Internal dependencies - */ -import { STORE_NAME } from '../../../store/constants'; -import { SIDEBAR_BLOCK, SIDEBAR_PATTERN } from '../constants'; - -const SettingsHeader = ( { sidebarName } ) => { - const { enableComplementaryArea } = useDispatch( interfaceStore ); - const openPatternSettings = () => enableComplementaryArea( STORE_NAME, SIDEBAR_PATTERN ); - const openBlockSettings = () => enableComplementaryArea( STORE_NAME, SIDEBAR_BLOCK ); - - const [ patternAriaLabel, patternActiveClass ] = - sidebarName === SIDEBAR_PATTERN - ? // translators: ARIA label for the Template sidebar tab, selected. - [ __( 'Pattern (selected)', 'wporg-patterns' ), 'is-active' ] - : // translators: ARIA label for the Template Settings Sidebar tab, not selected. - [ __( 'Pattern', 'wporg-patterns' ), '' ]; - - const [ blockAriaLabel, blockActiveClass ] = - sidebarName === SIDEBAR_BLOCK - ? // translators: ARIA label for the Block Settings Sidebar tab, selected. - [ __( 'Block (selected)', 'wporg-patterns' ), 'is-active' ] - : // translators: ARIA label for the Block Settings Sidebar tab, not selected. - [ __( 'Block', 'wporg-patterns' ), '' ]; - - /* Use a list so screen readers will announce how many tabs there are. */ - return ( -
    -
  • - -
  • -
  • - -
  • -
- ); -}; - -export default SettingsHeader; diff --git a/public_html/wp-content/plugins/pattern-creator/src/components/sidebar/settings-header/style.scss b/public_html/wp-content/plugins/pattern-creator/src/components/sidebar/settings-header/style.scss deleted file mode 100644 index 796b32623..000000000 --- a/public_html/wp-content/plugins/pattern-creator/src/components/sidebar/settings-header/style.scss +++ /dev/null @@ -1,98 +0,0 @@ -.components-panel__header.pattern-sidebar__panel-tabs { - justify-content: flex-start; - padding-left: 0; - padding-right: $grid-unit-20; - border-top: 0; - margin-top: 0; - - ul { - display: flex; - margin: 0; - } - - li { - margin: 0; - } - - .components-button.has-icon { - display: none; - margin: 0 0 0 auto; - padding: 0; - min-width: $icon-size; - height: $icon-size; - - @include break-medium() { - display: flex; - } - } -} - -.components-button.pattern-sidebar__panel-tab { - position: relative; - border-radius: 0; - height: $grid-unit-60; - background: transparent; - border: none; - box-shadow: none; - cursor: pointer; - // Use padding to offset the is-active border, this benefits Windows High Contrast mode. - padding: 3px $grid-unit-20; - margin-left: 0; - font-weight: 500; - - &:focus:not(:disabled) { - position: relative; - box-shadow: none; - } - - // This pseudo-element "duplicates" the tab label and sets the text to bold. - // This ensures that the tab doesn't change width when selected. - // See: https://github.com/WordPress/gutenberg/pull/9793 - &::after { - content: ""; - position: absolute; - right: 0; - bottom: 0; - left: 0; - pointer-events: none; - - // Draw the indicator. - background: var(--wp-admin-theme-color); - height: calc(0 * var(--wp-admin-border-width-focus)); - border-radius: 0; - - // Animation - transition: all 0.1s linear; - - @include reduce-motion("transition"); - } - - // Active. - &.is-active::after { - height: calc(1 * var(--wp-admin-border-width-focus)); - } - - // Focus. - &::before { - content: ""; - position: absolute; - top: $grid-unit-15; - right: $grid-unit-15; - bottom: $grid-unit-15; - left: $grid-unit-15; - pointer-events: none; - - // Draw the indicator. - box-shadow: 0 0 0 0 transparent; - border-radius: $radius-block-ui; - - // Animation - transition: all 0.1s linear; - - @include reduce-motion("transition"); - } - - &:focus-visible::before { - box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color); - } -} diff --git a/public_html/wp-content/plugins/pattern-creator/src/components/sidebar/style.scss b/public_html/wp-content/plugins/pattern-creator/src/components/sidebar/style.scss deleted file mode 100644 index 70ca024f8..000000000 --- a/public_html/wp-content/plugins/pattern-creator/src/components/sidebar/style.scss +++ /dev/null @@ -1,44 +0,0 @@ -.pattern-sidebar { - width: $sidebar-width; - - > .components-panel { - border-left: 0; - border-right: 0; - margin-bottom: -1px; - margin-top: -1px; - - > .components-panel__header { - background: $gray-100; - } - } - - .block-editor-block-inspector__card { - margin: 0; - } -} - -.pattern-sidebar__preview-link { - margin-top: $grid-unit-10; -} - -.pattern-global-styles-sidebar .interface-complementary-area-header .components-button.has-icon { - margin-left: 0; -} - -.pattern-global-styles-sidebar__reset-button.components-button { - margin-left: auto; -} - -.pattern-global-styles-sidebar__border-controls-row { - display: flex; - justify-content: space-between; - margin-bottom: $grid-unit-15; - - > * { - width: calc(50% - #{ $grid-unit-10 }); - } - - .components-border-style-control__buttons { - margin-bottom: 0; - } -} diff --git a/public_html/wp-content/plugins/pattern-creator/src/components/url-controller/index.js b/public_html/wp-content/plugins/pattern-creator/src/components/url-controller/index.js deleted file mode 100644 index 27304cf26..000000000 --- a/public_html/wp-content/plugins/pattern-creator/src/components/url-controller/index.js +++ /dev/null @@ -1,23 +0,0 @@ -/** - * WordPress dependencies - */ -import { useEffect } from '@wordpress/element'; -import { useSelect } from '@wordpress/data'; -import { store as coreStore } from '@wordpress/core-data'; - -import { POST_TYPE } from '../../store'; - -const BASE_URL = wporgBlockPattern.siteUrl; - -// Update page URL when the post's status changes, but only if the new status is not auto-draft. -export default function UrlController( { postId } ) { - const post = useSelect( ( select ) => select( coreStore ).getEntityRecord( 'postType', POST_TYPE, postId ) ); - useEffect( () => { - if ( 'auto-draft' !== post.status ) { - const newUrl = `${ BASE_URL }/pattern/${ postId }/edit/`; - window.history.replaceState( {}, '', newUrl ); - } - }, [ post.status ] ); - - return null; -} diff --git a/public_html/wp-content/plugins/pattern-creator/src/components/welcome-guide/images.js b/public_html/wp-content/plugins/pattern-creator/src/components/welcome-guide/images.js deleted file mode 100644 index 58a06e2d1..000000000 --- a/public_html/wp-content/plugins/pattern-creator/src/components/welcome-guide/images.js +++ /dev/null @@ -1,122 +0,0 @@ -/** - * WordPress dependencies - */ -import { SVG } from '@wordpress/primitives'; - -export const PatternsImage = () => ( - <> - - - - - - - - - - - - - - - - - - - - - - - -); - -export const ImageCollectionImage = () => ( - <> - - - - - - - - - - - - - - - - -); - -export const PatternEditorImage = () => ( - <> - - - - - - - - - - - - - - - - - - - - - - - -); diff --git a/public_html/wp-content/plugins/pattern-creator/src/components/welcome-guide/index.js b/public_html/wp-content/plugins/pattern-creator/src/components/welcome-guide/index.js deleted file mode 100644 index d85acaaf6..000000000 --- a/public_html/wp-content/plugins/pattern-creator/src/components/welcome-guide/index.js +++ /dev/null @@ -1,98 +0,0 @@ -/** - * WordPress dependencies - */ -import { Guide } from '@wordpress/components'; -import { useDispatch, useSelect } from '@wordpress/data'; -import { __ } from '@wordpress/i18n'; - -/** - * Internal dependencies - */ -import { ImageCollectionImage, PatternEditorImage, PatternsImage } from './images'; -import { store as patternStore } from '../../store'; - -/** - * Module constants - */ -export const GUIDE_ID = 'patternWelcomeGuide'; - -export default function WelcomeGuide() { - const isActive = useSelect( ( select ) => select( patternStore ).isFeatureActive( GUIDE_ID ), [] ); - - const { toggleFeature } = useDispatch( patternStore ); - - if ( ! isActive ) { - return null; - } - - return ( - toggleFeature( GUIDE_ID ) } - pages={ [ - { - image: ( -
- -
- ), - content: ( - <> -

- { __( 'Welcome to the pattern editor', 'wporg-patterns' ) } -

-

- { __( - 'Mix and match WordPress blocks together to create unique and compelling designs.', - 'wporg-patterns' - ) } -

- - ), - }, - { - image: ( -
- -
- ), - content: ( - <> -

- { __( 'Use our collection of license-free images', 'wporg-patterns' ) } -

-

- { __( - 'Don’t worry about licensing. We’ve provided a collection of worry-free images and media for you to use.', - 'wporg-patterns' - ) } -

- - ), - }, - { - image: ( -
- -
- ), - content: ( - <> -

- { __( 'Submit your pattern to the directory', 'wporg-patterns' ) } -

-

- { __( - 'Choose a category and share your pattern with the world. All patterns in the directory are available from any WordPress site.', - 'wporg-patterns' - ) } -

- - ), - }, - ] } - /> - ); -} diff --git a/public_html/wp-content/plugins/pattern-creator/src/components/welcome-guide/style.scss b/public_html/wp-content/plugins/pattern-creator/src/components/welcome-guide/style.scss deleted file mode 100644 index bf1dd7cba..000000000 --- a/public_html/wp-content/plugins/pattern-creator/src/components/welcome-guide/style.scss +++ /dev/null @@ -1,56 +0,0 @@ - -.pattern-creator-welcome-guide { - max-width: 320px; -} - -.pattern-creator-welcome-guide__image { - margin-bottom: $grid-unit-10; /* Pushes the dot controls away */ - display: flex; - align-items: center; - justify-content: center; - background: #1d2327; - height: 240px; - overflow: hidden; -} - -/* Change circle indicator color */ -.pattern-creator-welcome-guide .components-guide__page-control [aria-current="step"] circle { - fill: var(--wp-admin-theme-color); -} - -/* Change the close button color */ -.pattern-creator-welcome-guide .components-modal__header button { - background: #000; - color: #fff; -} - -.pattern-creator-welcome-guide__image svg { - position: absolute; -} - -.pattern-creator-welcome-guide__title, -.pattern-creator-welcome-guide p { - margin: 0; - padding: 0 $grid-unit-40; -} - -.pattern-creator-welcome-guide__title { - margin: $grid-unit-20 0; - font-size: 20px; - font-weight: 600; - line-height: normal; -} - -.pattern-creator-welcome-guide p { - margin-bottom: $grid-unit-20; - font-size: 14px; -} - -.pattern-creator-welcome-guide__link { - margin-top: $grid-unit-10; - display: block; -} - -.pattern-creator-welcome-guide .components-guide__footer > button { - padding: $grid-unit-10 $grid-unit-15; -} diff --git a/public_html/wp-content/plugins/pattern-creator/src/hooks/media.js b/public_html/wp-content/plugins/pattern-creator/src/hooks/media.js deleted file mode 100644 index 6f0a1294f..000000000 --- a/public_html/wp-content/plugins/pattern-creator/src/hooks/media.js +++ /dev/null @@ -1,13 +0,0 @@ -/** - * WordPress dependencies - */ -import { addFilter } from '@wordpress/hooks'; - -/** - * Internal dependencies - */ -import MediaPlaceholder from '../components/media-placeholder'; -import OpenverseGallery from '../components/openverse'; - -addFilter( 'editor.MediaPlaceholder', 'wporg/patterns/components/media-upload', () => MediaPlaceholder, 100 ); -addFilter( 'editor.MediaUpload', 'wporg-patterns/openverse-media-upload', () => OpenverseGallery, 100 ); diff --git a/public_html/wp-content/plugins/pattern-creator/src/hooks/use-post-data.js b/public_html/wp-content/plugins/pattern-creator/src/hooks/use-post-data.js deleted file mode 100644 index f4693dedb..000000000 --- a/public_html/wp-content/plugins/pattern-creator/src/hooks/use-post-data.js +++ /dev/null @@ -1,25 +0,0 @@ -/** - * External dependencies - */ -import { useDispatch, useSelect } from '@wordpress/data'; -import { store } from '@wordpress/editor'; - -/** - * A hook to get and set a post value. - * - * @param {string} property Identifier for a post property to use. - * - * @return {Array<*,Function>} A pair of values: the current property value and a callback to update this value. - */ -export default function usePostData( property ) { - const propValue = useSelect( ( select ) => select( store ).getEditedPostAttribute( property ) ); - - const { editPost } = useDispatch( store ); - const setPropValue = ( value ) => { - editPost( { - [ property ]: value, - } ); - }; - - return [ propValue, setPropValue ]; -} diff --git a/public_html/wp-content/plugins/pattern-creator/src/index.js b/public_html/wp-content/plugins/pattern-creator/src/index.js deleted file mode 100644 index 7ff6c4f09..000000000 --- a/public_html/wp-content/plugins/pattern-creator/src/index.js +++ /dev/null @@ -1,47 +0,0 @@ -/** - * WordPress dependencies - */ -import { dispatch } from '@wordpress/data'; -import { registerCoreBlocks } from '@wordpress/block-library'; -import { render, unmountComponentAtNode } from '@wordpress/element'; - -/** - * Internal dependencies - */ -import { store as patternStore } from './store'; -import './hooks/media'; -import Editor from './components/editor'; -import './api-middleware'; -import './style.scss'; - -/** - * Reinitializes the editor after the user chooses to reboot the editor after - * an unhandled error occurs, replacing previously mounted editor element using - * an initial state from prior to the crash. - * - * @param {Element} target DOM node in which editor is rendered. - * @param {Object} settings Editor settings. - * @param {number} settings.postId ID of the current post. - */ -export function reinitializeEditor( target, { postId, ...settings } ) { - unmountComponentAtNode( target ); - const reboot = reinitializeEditor.bind( null, target, settings ); - - // Update the store synchronously before rendering so that we won't trigger - // unnecessary re-renders with useEffect. - dispatch( patternStore ).updateSettings( settings ); - render( , target ); -} - -/** - * Initializes the pattern editor screen. - * - * @param {string} id ID of the root element to render the screen in. - * @param {Object} settings Editor settings. - */ -export function initialize( id, settings ) { - const target = document.getElementById( id ); - - registerCoreBlocks(); - reinitializeEditor( target, settings ); -} diff --git a/public_html/wp-content/plugins/pattern-creator/src/lock-unlock.js b/public_html/wp-content/plugins/pattern-creator/src/lock-unlock.js deleted file mode 100644 index c3859fa5d..000000000 --- a/public_html/wp-content/plugins/pattern-creator/src/lock-unlock.js +++ /dev/null @@ -1,9 +0,0 @@ -/** - * WordPress dependencies - */ -import { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/private-apis'; - -export const { lock, unlock } = __dangerousOptInToUnstableAPIsOnlyForCoreModules( - 'I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.', - '@wordpress/edit-post' // Hack to enable APIs by using a core package. -); diff --git a/public_html/wp-content/plugins/pattern-creator/src/store/actions.js b/public_html/wp-content/plugins/pattern-creator/src/store/actions.js deleted file mode 100644 index 0c79bd4af..000000000 --- a/public_html/wp-content/plugins/pattern-creator/src/store/actions.js +++ /dev/null @@ -1,73 +0,0 @@ -/** - * Returns an action object used to toggle a feature flag. - * - * @param {string} feature Feature name. - * - * @return {Object} Action object. - */ -export function toggleFeature( feature ) { - return { - type: 'TOGGLE_FEATURE', - feature: feature, - }; -} - -/** - * Returns an action object used to toggle the width of the editing canvas. - * - * @param {string} deviceType - * - * @return {Object} Action object. - */ -export function setPreviewDeviceType( deviceType ) { - return { - type: 'SET_PREVIEW_DEVICE_TYPE', - deviceType: deviceType, - }; -} - -/** - * Returns an action object used to open/close the inserter. - * - * @param {boolean|Object} value Whether the inserter should be - * opened (true) or closed (false). - * To specify an insertion point, - * use an object. - * @param {string} value.rootClientId The root client ID to insert at. - * @param {number} value.insertionIndex The index to insert at. - * - * @return {Object} Action object. - */ -export function setIsInserterOpened( value ) { - return { - type: 'SET_IS_INSERTER_OPENED', - value: value, - }; -} - -/** - * Returns an action object used to update the settings. - * - * @param {Object} settings New settings. - * - * @return {Object} Action object. - */ -export function updateSettings( settings ) { - return { - type: 'UPDATE_SETTINGS', - settings: settings, - }; -} - -/** - * Sets whether the list view panel should be open. - * - * @param {boolean} isOpen If true, opens the list view. If false, closes it. - * It does not toggle the state, but sets it directly. - */ -export function setIsListViewOpened( isOpen ) { - return { - type: 'SET_IS_LIST_VIEW_OPENED', - isOpen: isOpen, - }; -} diff --git a/public_html/wp-content/plugins/pattern-creator/src/store/constants.js b/public_html/wp-content/plugins/pattern-creator/src/store/constants.js deleted file mode 100644 index 5b4a979e3..000000000 --- a/public_html/wp-content/plugins/pattern-creator/src/store/constants.js +++ /dev/null @@ -1,12 +0,0 @@ -/** - * The identifier for the data store. - * - * @type {string} - */ -export const STORE_NAME = 'wporg/pattern-creator'; - -export const POST_TYPE = 'wporg-pattern'; - -export const CATEGORY_SLUG = 'wporg-pattern-category'; - -export const KEYWORD_SLUG = 'wpop_keywords'; diff --git a/public_html/wp-content/plugins/pattern-creator/src/store/defaults.js b/public_html/wp-content/plugins/pattern-creator/src/store/defaults.js deleted file mode 100644 index e83e8b31f..000000000 --- a/public_html/wp-content/plugins/pattern-creator/src/store/defaults.js +++ /dev/null @@ -1,5 +0,0 @@ -export const PREFERENCES_DEFAULTS = { - features: { - patternWelcomeGuide: true, - }, -}; diff --git a/public_html/wp-content/plugins/pattern-creator/src/store/index.js b/public_html/wp-content/plugins/pattern-creator/src/store/index.js deleted file mode 100644 index 1f69c105b..000000000 --- a/public_html/wp-content/plugins/pattern-creator/src/store/index.js +++ /dev/null @@ -1,28 +0,0 @@ -/** - * WordPress dependencies - */ -import { createReduxStore, registerStore } from '@wordpress/data'; - -/** - * Internal dependencies - */ -import reducer from './reducer'; -import * as actions from './actions'; -import * as selectors from './selectors'; -import { STORE_NAME } from './constants'; - -export const storeConfig = { - reducer: reducer, - actions: actions, - selectors: selectors, - persist: [ 'preferences' ], -}; - -export { POST_TYPE, CATEGORY_SLUG, KEYWORD_SLUG } from './constants'; - -export const store = createReduxStore( STORE_NAME, storeConfig ); - -// Technically `registerStore` has been deprecated in favor of `register`, but -// `register` does not support the persistance layer. To switch, we'll need to -// update the `preferences` state to use the `@wordpress/preferences` package. -registerStore( STORE_NAME, storeConfig ); diff --git a/public_html/wp-content/plugins/pattern-creator/src/store/reducer.js b/public_html/wp-content/plugins/pattern-creator/src/store/reducer.js deleted file mode 100644 index 9b8249ddf..000000000 --- a/public_html/wp-content/plugins/pattern-creator/src/store/reducer.js +++ /dev/null @@ -1,114 +0,0 @@ -/** - * WordPress dependencies - */ -import { combineReducers } from '@wordpress/data'; - -/** - * Internal dependencies - */ -import { PREFERENCES_DEFAULTS } from './defaults'; - -/** - * Reducer returning the user preferences. - * - * @param {Object} state Current state. - * @param {Object} action Dispatched action. - * @return {Object} Updated state. - */ -export const preferences = combineReducers( { - features( state = PREFERENCES_DEFAULTS.features, action ) { - switch ( action.type ) { - case 'TOGGLE_FEATURE': { - return { - ...state, - [ action.feature ]: ! state[ action.feature ], - }; - } - default: - return state; - } - }, -} ); - -/** - * Reducer returning the editing canvas device type. - * - * @param {Object} state Current state. - * @param {Object} action Dispatched action. - * - * @return {Object} Updated state. - */ -export function deviceType( state = 'Desktop', action ) { - switch ( action.type ) { - case 'SET_PREVIEW_DEVICE_TYPE': - return action.deviceType; - } - - return state; -} - -/** - * Reducer returning the settings. - * - * @param {Object} state Current state. - * @param {Object} action Dispatched action. - * - * @return {Object} Updated state. - */ -export function settings( state = {}, action ) { - switch ( action.type ) { - case 'UPDATE_SETTINGS': - return { - ...state, - ...action.settings, - }; - } - - return state; -} - -/** - * Reducer to set the block inserter panel open or closed. - * - * Note: this reducer interacts with the list view panels reducers - * to make sure that only one of the two panels is open at the same time. - * - * @param {boolean|Object} state Current state. - * @param {Object} action Dispatched action. - */ -export function blockInserterPanel( state = false, action ) { - switch ( action.type ) { - case 'SET_IS_LIST_VIEW_OPENED': - return action.isOpen ? false : state; - case 'SET_IS_INSERTER_OPENED': - return action.value; - } - return state; -} - -/** - * Reducer to set the list view panel open or closed. - * - * Note: this reducer interacts with inserter panels reducers - * to make sure that only one of the two panels is open at the same time. - * - * @param {Object} state Current state. - * @param {Object} action Dispatched action. - */ -export function listViewPanel( state = false, action ) { - switch ( action.type ) { - case 'SET_IS_INSERTER_OPENED': - return action.value ? false : state; - case 'SET_IS_LIST_VIEW_OPENED': - return action.isOpen; - } - return state; -} - -export default combineReducers( { - preferences, - deviceType, - settings, - blockInserterPanel, - listViewPanel, -} ); diff --git a/public_html/wp-content/plugins/pattern-creator/src/store/selectors.js b/public_html/wp-content/plugins/pattern-creator/src/store/selectors.js deleted file mode 100644 index 6073248f0..000000000 --- a/public_html/wp-content/plugins/pattern-creator/src/store/selectors.js +++ /dev/null @@ -1,165 +0,0 @@ -/** - * External dependencies - */ -import { get } from 'lodash'; -import createSelector from 'rememo'; - -/** - * WordPress dependencies - */ -import { store as coreStore } from '@wordpress/core-data'; -import { createRegistrySelector } from '@wordpress/data'; -import { - /* eslint-disable-next-line @wordpress/no-unsafe-wp-apis */ - __unstableSerializeAndClean, - getDefaultBlockName, - getFreeformContentHandlerName, -} from '@wordpress/blocks'; - -/** - * Internal dependencies - */ -import { POST_TYPE } from './constants'; - -/** - * Shared reference to an empty object for cases where it is important to avoid - * returning a new object reference on every invocation, as in a connected or - * other pure component which performs `shouldComponentUpdate` check on props. - * This should be used as a last resort, since the normalized data should be - * maintained by the reducer result in state. - */ -const EMPTY_OBJECT = {}; -const EMPTY_ARRAY = []; - -/** - * Returns whether the given feature is enabled or not. - * - * @param {Object} state Global application state. - * @param {string} feature Feature slug. - * - * @return {boolean} Is active. - */ -export function isFeatureActive( state, feature ) { - return get( state.preferences.features, [ feature ], false ); -} - -/** - * Returns the current editing canvas device type. - * - * @param {Object} state Global application state. - * - * @return {string} Device type. - */ -export function getPreviewDeviceType( state ) { - return state.deviceType; -} - -/** - * Returns the settings, taking into account active features and permissions. - * - * @param {Object} state Global application state. - * @param {Function} setIsInserterOpen Setter for the open state of the global inserter. - * - * @return {Object} Settings. - */ -export const getSettings = createSelector( - ( state, setIsInserterOpen ) => { - const settings = { - ...state.settings, - fullscreenMode: true, - outlineMode: true, - focusMode: isFeatureActive( state, 'focusMode' ), - hasFixedToolbar: - isFeatureActive( state, 'fixedToolbar' ) || getPreviewDeviceType( state ) !== 'Desktop', - hasReducedUI: isFeatureActive( state, 'reducedUI' ), - __experimentalLocalAutosaveInterval: 30, - __experimentalSetIsInserterOpened: setIsInserterOpen, - }; - - return settings; - }, - ( state ) => [ - state.settings, - isFeatureActive( state, 'focusMode' ), - isFeatureActive( state, 'fixedToolbar' ), - isFeatureActive( state, 'reducedUI' ), - getPreviewDeviceType( state ), - ] -); - -/** - * Returns the current opened/closed state of the inserter panel. - * - * @param {Object} state Global application state. - * - * @return {boolean} True if the inserter panel should be open; false if closed. - */ -export function isInserterOpened( state ) { - return !! state.blockInserterPanel; -} - -/** - * Get the insertion point for the inserter. - * - * @param {Object} state Global application state. - * - * @return {Object} The root client ID and index to insert at. - */ -export function __experimentalGetInsertionPoint( state ) { - const { rootClientId, insertionIndex } = state.blockInserterPanel; - return { rootClientId, insertionIndex }; -} - -/** - * Returns the current opened/closed state of the list view panel. - * - * @param {Object} state Global application state. - * - * @return {boolean} True if the list view panel should be open; false if closed. - */ -export function isListViewOpened( state ) { - return state.listViewPanel; -} - -/** - * Returns whether the pattern is "saveable". - * - * A pattern can be saved if it has content. The other requirements - * are handled in the publish flow, content is the only thing - * required for saving a draft. - * - * See https://github.com/WordPress/gutenberg/blob/31330dbb737ce30646a4300410faed633061547a/packages/editor/src/store/selectors.js#L531 - * - * @param {Object} state Global application state. - * @param {number} postId The ID of this pattern. - * - * @return {Object} Whether the post can be saved. - */ -export const isPatternSaveable = createRegistrySelector( ( select ) => ( state, postId ) => { - const post = select( coreStore ).getEditedEntityRecord( 'postType', POST_TYPE, postId ) || EMPTY_OBJECT; - - return ! isEditedPostEmpty( post ); -} ); - -function isEditedPostEmpty( post ) { - const blocks = post.blocks || EMPTY_ARRAY; - - if ( blocks.length ) { - if ( blocks.length > 1 ) { - return false; - } - - const blockName = blocks[ 0 ].name; - if ( blockName !== getDefaultBlockName() && blockName !== getFreeformContentHandlerName() ) { - return false; - } - } - - if ( typeof post.content === 'function' ) { - return ! post.content( post ); - } else if ( post.blocks ) { - return ! __unstableSerializeAndClean( post.blocks ); - } else if ( post.content ) { - return ! post.content; - } -} diff --git a/public_html/wp-content/plugins/pattern-creator/src/store/test/actions.js b/public_html/wp-content/plugins/pattern-creator/src/store/test/actions.js deleted file mode 100644 index 031041acb..000000000 --- a/public_html/wp-content/plugins/pattern-creator/src/store/test/actions.js +++ /dev/null @@ -1,29 +0,0 @@ -/** - * Internal dependencies - */ -import { setIsListViewOpened, toggleFeature } from '../actions'; - -describe( 'actions', () => { - describe( 'toggleFeature', () => { - it( 'should return TOGGLE_FEATURE action', () => { - const feature = 'name'; - expect( toggleFeature( feature ) ).toEqual( { - type: 'TOGGLE_FEATURE', - feature: feature, - } ); - } ); - } ); - - describe( 'setIsListViewOpened', () => { - it( 'should return the SET_IS_LIST_VIEW_OPENED action', () => { - expect( setIsListViewOpened( true ) ).toEqual( { - type: 'SET_IS_LIST_VIEW_OPENED', - isOpen: true, - } ); - expect( setIsListViewOpened( false ) ).toEqual( { - type: 'SET_IS_LIST_VIEW_OPENED', - isOpen: false, - } ); - } ); - } ); -} ); diff --git a/public_html/wp-content/plugins/pattern-creator/src/store/test/reducer.js b/public_html/wp-content/plugins/pattern-creator/src/store/test/reducer.js deleted file mode 100644 index e22099dc7..000000000 --- a/public_html/wp-content/plugins/pattern-creator/src/store/test/reducer.js +++ /dev/null @@ -1,106 +0,0 @@ -/** - * External dependencies - */ -import deepFreeze from 'deep-freeze'; - -/** - * Internal dependencies - */ -import { blockInserterPanel, listViewPanel, preferences, settings } from '../reducer'; -import { PREFERENCES_DEFAULTS } from '../defaults'; - -import { setIsInserterOpened, setIsListViewOpened } from '../actions'; - -describe( 'state', () => { - describe( 'preferences()', () => { - it( 'should apply all defaults', () => { - const state = preferences( undefined, {} ); - - expect( state ).toEqual( PREFERENCES_DEFAULTS ); - } ); - - it( 'should toggle a feature flag', () => { - const state = preferences( deepFreeze( { features: { chicken: true } } ), { - type: 'TOGGLE_FEATURE', - feature: 'chicken', - } ); - - expect( state.features ).toEqual( { chicken: false } ); - } ); - } ); - - describe( 'settings()', () => { - it( 'should apply default state', () => { - expect( settings( undefined, {} ) ).toEqual( {} ); - } ); - - it( 'should default to returning the same state', () => { - const state = {}; - expect( settings( state, {} ) ).toBe( state ); - } ); - - it( 'should update settings with a shallow merge', () => { - expect( - settings( - deepFreeze( { - setting: { key: 'value' }, - otherSetting: 'value', - } ), - { - type: 'UPDATE_SETTINGS', - settings: { setting: { newKey: 'newValue' } }, - } - ) - ).toEqual( { - setting: { newKey: 'newValue' }, - otherSetting: 'value', - } ); - } ); - } ); - - describe( 'blockInserterPanel()', () => { - it( 'should apply default state', () => { - expect( blockInserterPanel( undefined, {} ) ).toEqual( false ); - } ); - - it( 'should default to returning the same state', () => { - expect( blockInserterPanel( true, {} ) ).toBe( true ); - } ); - - it( 'should set the open state of the inserter panel', () => { - expect( blockInserterPanel( false, setIsInserterOpened( true ) ) ).toBe( true ); - expect( blockInserterPanel( true, setIsInserterOpened( false ) ) ).toBe( false ); - } ); - - it( 'should close the inserter when opening the list view panel', () => { - expect( blockInserterPanel( true, setIsListViewOpened( true ) ) ).toBe( false ); - } ); - - it( 'should not change the state when closing the list view panel', () => { - expect( blockInserterPanel( true, setIsListViewOpened( false ) ) ).toBe( true ); - } ); - } ); - - describe( 'listViewPanel()', () => { - it( 'should apply default state', () => { - expect( listViewPanel( undefined, {} ) ).toEqual( false ); - } ); - - it( 'should default to returning the same state', () => { - expect( listViewPanel( true, {} ) ).toBe( true ); - } ); - - it( 'should set the open state of the list view panel', () => { - expect( listViewPanel( false, setIsListViewOpened( true ) ) ).toBe( true ); - expect( listViewPanel( true, setIsListViewOpened( false ) ) ).toBe( false ); - } ); - - it( 'should close the list view when opening the inserter panel', () => { - expect( listViewPanel( true, setIsInserterOpened( true ) ) ).toBe( false ); - } ); - - it( 'should not change the state when closing the inserter panel', () => { - expect( listViewPanel( true, setIsInserterOpened( false ) ) ).toBe( true ); - } ); - } ); -} ); diff --git a/public_html/wp-content/plugins/pattern-creator/src/store/test/selectors.js b/public_html/wp-content/plugins/pattern-creator/src/store/test/selectors.js deleted file mode 100644 index f3984fa3a..000000000 --- a/public_html/wp-content/plugins/pattern-creator/src/store/test/selectors.js +++ /dev/null @@ -1,151 +0,0 @@ -/** - * Internal dependencies - */ -import { getSettings, isFeatureActive, isInserterOpened, isListViewOpened, isPatternSaveable } from '../selectors'; - -describe( 'selectors', () => { - describe( 'isFeatureActive', () => { - it( 'is tolerant to an undefined features preference', () => { - // See: https://github.com/WordPress/gutenberg/issues/14580 - const state = { - preferences: {}, - }; - - expect( isFeatureActive( state, 'chicken' ) ).toBe( false ); - } ); - - it( 'should return true if feature is active', () => { - const state = { - preferences: { - features: { - chicken: true, - }, - }, - }; - - expect( isFeatureActive( state, 'chicken' ) ).toBe( true ); - } ); - - it( 'should return false if feature is not active', () => { - const state = { - preferences: { - features: { - chicken: false, - }, - }, - }; - - expect( isFeatureActive( state, 'chicken' ) ).toBe( false ); - } ); - - it( 'should return false if feature is not referred', () => { - const state = { - preferences: { - features: {}, - }, - }; - - expect( isFeatureActive( state, 'chicken' ) ).toBe( false ); - } ); - } ); - - describe( 'getSettings', () => { - it( 'returns the default settings', () => { - const state = { settings: {}, preferences: {} }; - const setInserterOpened = () => {}; - expect( getSettings( state, setInserterOpened ) ).toEqual( { - outlineMode: true, - focusMode: false, - fullscreenMode: true, - hasFixedToolbar: true, - hasReducedUI: false, - __experimentalSetIsInserterOpened: setInserterOpened, - __experimentalLocalAutosaveInterval: 30, - } ); - } ); - - it( 'returns the merged settings', () => { - const state = { - settings: { key: 'value' }, - preferences: { - features: { - focusMode: true, - fixedToolbar: true, - reducedUI: true, - }, - }, - }; - const setInserterOpened = () => {}; - expect( getSettings( state, setInserterOpened ) ).toEqual( { - key: 'value', - outlineMode: true, - focusMode: true, - fullscreenMode: true, - hasFixedToolbar: true, - hasReducedUI: true, - __experimentalSetIsInserterOpened: setInserterOpened, - __experimentalLocalAutosaveInterval: 30, - } ); - } ); - } ); - - describe( 'isInserterOpened', () => { - it( 'returns the block inserter panel isOpened state', () => { - const state = { - blockInserterPanel: true, - }; - expect( isInserterOpened( state ) ).toBe( true ); - state.blockInserterPanel = false; - expect( isInserterOpened( state ) ).toBe( false ); - } ); - } ); - - describe( 'isListViewOpened', () => { - it( 'returns the list view panel isOpened state', () => { - const state = { - listViewPanel: true, - }; - expect( isListViewOpened( state ) ).toBe( true ); - state.listViewPanel = false; - expect( isListViewOpened( state ) ).toBe( false ); - } ); - } ); - - it( 'should return false if post has no blocks', () => { - isPatternSaveable.registry = { - select: jest.fn( () => ( { - getEditedEntityRecord: () => { - return { - blocks: [], - }; - }, - } ) ), - }; - - expect( isPatternSaveable( {} ) ).toBe( false ); - } ); - - describe( 'isPatternSaveable', () => { - it( 'should return true if post has a block', () => { - isPatternSaveable.registry = { - select: jest.fn( () => ( { - getEditedEntityRecord: () => { - return { - blocks: [ - { - attributes: { content: 'w', dropCap: false }, - clientId: 'wordpress', - innerBlocks: [], - isValid: true, - name: 'core/paragraph', - }, - ], - }; - }, - } ) ), - }; - - expect( isPatternSaveable( {} ) ).toBe( true ); - } ); - } ); -} ); diff --git a/public_html/wp-content/plugins/pattern-creator/src/style.scss b/public_html/wp-content/plugins/pattern-creator/src/style.scss deleted file mode 100644 index 5467fab1b..000000000 --- a/public_html/wp-content/plugins/pattern-creator/src/style.scss +++ /dev/null @@ -1,20 +0,0 @@ -/* Base styles */ -@import "~@wordpress/base-styles/colors"; -@import "~@wordpress/base-styles/variables"; -@import "~@wordpress/base-styles/mixins"; -@import "~@wordpress/base-styles/breakpoints"; -@import "~@wordpress/base-styles/animations"; -@import "~@wordpress/base-styles/z-index"; -@import "~@wordpress/base-styles/default-custom-properties"; - -/* Components */ -@import "./components/block-editor/style"; -@import "./components/editor/style"; -@import "./components/header/style"; -@import "./components/header/more-menu/style"; -@import "./components/openverse/style"; -@import "./components/secondary-sidebar/style"; -@import "./components/sidebar/style"; -@import "./components/sidebar/settings-header/style"; -@import "./components/submission-modal/style"; -@import "./components/welcome-guide/style"; diff --git a/public_html/wp-content/plugins/pattern-creator/view/editor.php b/public_html/wp-content/plugins/pattern-creator/view/editor.php deleted file mode 100644 index a8fde1fc0..000000000 --- a/public_html/wp-content/plugins/pattern-creator/view/editor.php +++ /dev/null @@ -1,45 +0,0 @@ -'; -} else { - // Include block content from other files to simplify HTML markup. - ob_start(); - if ( ! $is_logged_in ) { - include __DIR__ . '/log-in.php'; - } elseif ( ! $can_edit ) { - include __DIR__ . '/not-owner.php'; - } - $template_html = sprintf( '
%s
', do_blocks( ob_get_clean() ) ); -} - -?> -> - - - - - -> - - - - - - - diff --git a/public_html/wp-content/plugins/pattern-creator/view/log-in.php b/public_html/wp-content/plugins/pattern-creator/view/log-in.php deleted file mode 100644 index 010cc5fd7..000000000 --- a/public_html/wp-content/plugins/pattern-creator/view/log-in.php +++ /dev/null @@ -1,65 +0,0 @@ - 'new-pattern' ); -if ( get_query_var( PATTERN_ID_VAR ) ) { - $current_page_query_args[ PATTERN_ID_VAR ] = get_query_var( PATTERN_ID_VAR ); -} -$current_page_url = add_query_arg( $current_page_query_args, home_url() ); - -?> - - - -
- - -
- -

- - - -

- -

- - - -
- -
- -
- - - -

- review the guidelines.', 'wporg-patterns' ) ), - esc_url( home_url( '/about/' ) ) - ); - ?> -

- - - - - -
- - -
- - - diff --git a/public_html/wp-content/plugins/pattern-creator/view/not-owner.php b/public_html/wp-content/plugins/pattern-creator/view/not-owner.php deleted file mode 100644 index 364a14cc5..000000000 --- a/public_html/wp-content/plugins/pattern-creator/view/not-owner.php +++ /dev/null @@ -1,37 +0,0 @@ - - - - -
- - -
- - -

- - - -
-
-

-
- - - - - -
- - -
- - - diff --git a/public_html/wp-content/plugins/pattern-creator/webpack.config.js b/public_html/wp-content/plugins/pattern-creator/webpack.config.js deleted file mode 100644 index 2de405cb8..000000000 --- a/public_html/wp-content/plugins/pattern-creator/webpack.config.js +++ /dev/null @@ -1,32 +0,0 @@ -const defaultConfig = require( '@wordpress/scripts/config/webpack.config' ); -const DependencyExtractionWebpackPlugin = require( '@wordpress/dependency-extraction-webpack-plugin' ); - -const config = { - ...defaultConfig, - output: { - ...defaultConfig.output, - library: [ 'wp', 'patternCreator' ], - libraryTarget: 'window', - }, - - plugins: [ - ...defaultConfig.plugins.filter( - ( plugin ) => plugin.constructor.name !== 'DependencyExtractionWebpackPlugin' - ), - new DependencyExtractionWebpackPlugin( { - requestToExternal( request ) { - if ( - request === '@wordpress/editor' || - request === '@wordpress/icons' || - request === '@wordpress/interface' || - request === '@wordpress/fields' || - request === '@wordpress/dataviews' - ) { - return false; - } - }, - } ), - ], -}; - -module.exports = config; diff --git a/public_html/wp-content/plugins/pattern-directory/bootstrap.php b/public_html/wp-content/plugins/pattern-directory/bootstrap.php index 5b0a1e53a..b4a61f401 100644 --- a/public_html/wp-content/plugins/pattern-directory/bootstrap.php +++ b/public_html/wp-content/plugins/pattern-directory/bootstrap.php @@ -11,12 +11,15 @@ require_once __DIR__ . '/includes/class-rest-flags-controller.php'; require_once __DIR__ . '/includes/class-rest-favorite-controller.php'; require_once __DIR__ . '/includes/logging.php'; +require_once __DIR__ . '/includes/openverse.php'; require_once __DIR__ . '/includes/pattern-post-type.php'; require_once __DIR__ . '/includes/pattern-flag-post-type.php'; require_once __DIR__ . '/includes/pattern-validation.php'; +require_once __DIR__ . '/includes/editor.php'; require_once __DIR__ . '/includes/search.php'; require_once __DIR__ . '/includes/favorite.php'; require_once __DIR__ . '/includes/stats.php'; require_once __DIR__ . '/includes/admin.php'; require_once __DIR__ . '/includes/notifications.php'; require_once __DIR__ . '/includes/badges.php'; +require_once __DIR__ . '/includes/mock-blocks.php'; diff --git a/public_html/wp-content/plugins/pattern-directory/includes/admin-patterns.php b/public_html/wp-content/plugins/pattern-directory/includes/admin-patterns.php index 4cbe13f50..50de661f2 100644 --- a/public_html/wp-content/plugins/pattern-directory/includes/admin-patterns.php +++ b/public_html/wp-content/plugins/pattern-directory/includes/admin-patterns.php @@ -422,6 +422,11 @@ function add_row_actions( $actions, $post ) { return $actions; } + $post_type_object = get_post_type_object( $post->post_type ); + if ( ! current_user_can( $post_type_object->cap->edit_others_posts ) ) { + return array_intersect_key( $actions, array_fill_keys( array( 'edit', 'view', 'trash', 'untrash', 'delete' ), true ) ); + } + $saved_actions = array_intersect_key( $actions, array_fill_keys( array( 'trash', 'untrash', 'delete' ), true ) ); $actions = array_intersect_key( $actions, array_fill_keys( array( 'edit', 'view' ), true ) ); @@ -495,6 +500,11 @@ function add_row_actions( $actions, $post ) { function add_bulk_actions( $actions ) { $saved_actions = array_intersect_key( $actions, array_fill_keys( array( 'trash', 'untrash', 'delete' ), true ) ); + $post_type_object = get_post_type_object( PATTERN ); + if ( ! current_user_can( $post_type_object->cap->edit_others_posts ) ) { + return $saved_actions; + } + $actions = array( 'publish' => __( 'Publish', 'wporg-patterns' ), 'spam' => __( 'Spam', 'wporg-patterns' ), diff --git a/public_html/wp-content/plugins/pattern-directory/includes/admin-stats.php b/public_html/wp-content/plugins/pattern-directory/includes/admin-stats.php index 3395ffc1e..ace91251b 100644 --- a/public_html/wp-content/plugins/pattern-directory/includes/admin-stats.php +++ b/public_html/wp-content/plugins/pattern-directory/includes/admin-stats.php @@ -32,7 +32,7 @@ function add_subpage() { $parent_slug, __( 'Pattern Stats', 'wporg-patterns' ), __( 'Stats', 'wporg-patterns' ), - $post_type_object->cap->edit_posts, + $post_type_object->cap->edit_others_posts, PATTERN_POST_TYPE . '-stats', __NAMESPACE__ . '\render_subpage' ); @@ -143,7 +143,7 @@ function handle_csv_export() { return; } - if ( ! current_user_can( $cpt->cap->edit_posts ) ) { + if ( ! current_user_can( $cpt->cap->edit_others_posts ) ) { $csv->error->add( 'no_permission', 'Sorry, you do not have permission to do this.' ); $csv->emit_file(); } diff --git a/public_html/wp-content/plugins/pattern-directory/includes/admin.php b/public_html/wp-content/plugins/pattern-directory/includes/admin.php index b6087888e..08077d384 100644 --- a/public_html/wp-content/plugins/pattern-directory/includes/admin.php +++ b/public_html/wp-content/plugins/pattern-directory/includes/admin.php @@ -26,14 +26,14 @@ function filter_admin_bar_links( $wp_admin_bar ) { // "New Block Pattern" link. $new_pattern = $wp_admin_bar->get_node( 'new-wporg-pattern' ); if ( $new_pattern ) { - $new_pattern->href = site_url( 'new-pattern/' ); + $new_pattern->href = add_query_arg( array( 'post_type' => POST_TYPE ), admin_url( 'post-new.php' ) ); $wp_admin_bar->add_node( $new_pattern ); } // Top-level "+ New" link, if New Block Pattern is the only item. $new_content = $wp_admin_bar->get_node( 'new-content' ); if ( $new_content && str_contains( $new_content->href, POST_TYPE ) ) { - $new_content->href = site_url( 'new-pattern/' ); + $new_content->href = add_query_arg( array( 'post_type' => POST_TYPE ), admin_url( 'post-new.php' ) ); $wp_admin_bar->add_node( $new_content ); } @@ -41,8 +41,6 @@ function filter_admin_bar_links( $wp_admin_bar ) { if ( is_singular( POST_TYPE ) ) { $edit_pattern = $wp_admin_bar->get_node( 'edit' ); if ( $edit_pattern ) { - $pattern_id = wp_get_post_parent_id() ?: get_the_ID(); - $edit_pattern->href = site_url( "pattern/$pattern_id/edit/" ); if ( wp_get_post_parent_id() !== 0 ) { $edit_pattern->title = __( 'Edit Original Pattern', 'wporg-patterns' ); } diff --git a/public_html/wp-content/plugins/pattern-directory/includes/editor.php b/public_html/wp-content/plugins/pattern-directory/includes/editor.php new file mode 100644 index 000000000..d6177fdb6 --- /dev/null +++ b/public_html/wp-content/plugins/pattern-directory/includes/editor.php @@ -0,0 +1,200 @@ +post_type === POST_TYPE; + } + + return false; +} + +/** + * Set up page for customized editor. + */ +function set_default_theme() { + if ( ! is_pattern_editor() ) { + return; + } + + $theme = ( 'local' === wp_get_environment_type() ) ? 'twentytwentyfour' : 'core/twentytwentyfour'; + + add_filter( + 'template', + function() use ( $theme ) { + return $theme; + } + ); + + add_filter( + 'stylesheet', + function() use ( $theme ) { + return $theme; + } + ); +} + +/** + * Enqueue scripts for the block editor. + * + * @throws Error If the build files don't exist. + */ +function enqueue_editor_assets() { + if ( function_exists( 'get_current_screen' ) && POST_TYPE !== get_current_screen()->id ) { + return; + } + + $dir = dirname( dirname( __FILE__ ) ); + + $script_asset_path = "$dir/build/pattern-post-type.asset.php"; + if ( ! file_exists( $script_asset_path ) ) { + throw new Error( 'You need to run `yarn start` or `yarn build` for the Pattern Directory.' ); + } + + $script_asset = require $script_asset_path; + wp_enqueue_script( + SCRIPT_HANDLE, + plugins_url( 'build/pattern-post-type.js', dirname( __FILE__ ) ), + $script_asset['dependencies'], + $script_asset['version'], + true + ); + + wp_set_script_translations( SCRIPT_HANDLE, 'wporg-patterns' ); + + $locales = ( is_admin() ) ? get_locales_with_english_names() : get_locales_with_native_names(); + + wp_add_inline_script( + SCRIPT_HANDLE, + 'var wporgLocaleData = ' . wp_json_encode( $locales ) . ';', + 'before' + ); + + wp_add_inline_script( + SCRIPT_HANDLE, + sprintf( + "var wporgLocale = JSON.parse( decodeURIComponent( '%s' ) );", + rawurlencode( wp_json_encode( array( + 'id' => get_locale(), + 'displayName' => is_rosetta_site() ? get_rosetta_name() : '', + ) ) ), + ), + 'before' + ); + + wp_add_inline_script( + SCRIPT_HANDLE, + sprintf( + 'var wporgBlockPattern = JSON.parse( decodeURIComponent( \'%s\' ) );', + rawurlencode( wp_json_encode( array( + 'siteUrl' => esc_url( home_url() ), + ) ) ) + ), + 'before' + ); + + wp_enqueue_style( + 'wporg-pattern-post-type', + plugins_url( 'build/pattern-post-type.css', dirname( __FILE__ ) ), + array(), + $script_asset['version'], + ); +} + +/** + * Restrict the set of blocks allowed in block patterns. + * + * @param bool|array $allowed_block_types Array of block type slugs, or boolean to enable/disable all. + * @param WP_Block_Editor_Context $block_editor_context The post resource data. + * + * @return bool|array A (possibly) filtered list of block types. + */ +function remove_disallowed_blocks( $allowed_block_types, $block_editor_context ) { + $disallowed_block_types = array( + // Remove blocks that don't make sense in Block Patterns + 'core/freeform', // Classic block + 'core/legacy-widget', + 'core/more', + 'core/nextpage', + 'core/block', // Reusable blocks + 'core/shortcode', + 'core/template-part', + ); + + if ( isset( $block_editor_context->post ) && POST_TYPE === $block_editor_context->post->post_type ) { + // This can be true if all block types are allowed, so to filter them we + // need to get the list of all registered blocks first. + if ( true === $allowed_block_types ) { + $allowed_block_types = array_keys( WP_Block_Type_Registry::get_instance()->get_all_registered() ); + } + $allowed_block_types = array_diff( $allowed_block_types, $disallowed_block_types ); + + // Remove the "WordPress.org" blocks, like Global Header & Global Footer. + $allowed_block_types = array_filter( + $allowed_block_types, + function ( $block_type ) { + return 'wporg/' !== substr( $block_type, 0, 6 ); + } + ); + } + + return is_array( $allowed_block_types ) ? array_values( $allowed_block_types ) : $allowed_block_types; +} + +/** + * Disable the block directory in wp-admin for patterns. + * + * The block directory file isn't loaded on the frontend, so this is only needed for site admins who can open + * the pattern in the "real" wp-admin editor. + */ +function disable_block_directory() { + if ( is_admin() && POST_TYPE === get_post_type() ) { + remove_action( 'enqueue_block_editor_assets', 'wp_enqueue_editor_block_directory_assets' ); + remove_action( 'enqueue_block_editor_assets', 'gutenberg_enqueue_block_editor_assets_block_directory' ); + } +} diff --git a/public_html/wp-content/plugins/pattern-creator/includes/mock-blocks.php b/public_html/wp-content/plugins/pattern-directory/includes/mock-blocks.php similarity index 99% rename from public_html/wp-content/plugins/pattern-creator/includes/mock-blocks.php rename to public_html/wp-content/plugins/pattern-directory/includes/mock-blocks.php index 4d3e9b3f1..b1aabadf9 100644 --- a/public_html/wp-content/plugins/pattern-creator/includes/mock-blocks.php +++ b/public_html/wp-content/plugins/pattern-directory/includes/mock-blocks.php @@ -3,7 +3,7 @@ * Mock dynamic blocks that use site content. */ -namespace WordPressdotorg\Pattern_Creator\MockBlocks; +namespace WordPressdotorg\Pattern_Directory\MockBlocks; use WP_Block_Supports; diff --git a/public_html/wp-content/plugins/pattern-creator/includes/openverse-client.php b/public_html/wp-content/plugins/pattern-directory/includes/openverse-client.php similarity index 99% rename from public_html/wp-content/plugins/pattern-creator/includes/openverse-client.php rename to public_html/wp-content/plugins/pattern-directory/includes/openverse-client.php index 66ede28b3..f1d745dba 100644 --- a/public_html/wp-content/plugins/pattern-creator/includes/openverse-client.php +++ b/public_html/wp-content/plugins/pattern-directory/includes/openverse-client.php @@ -2,7 +2,7 @@ /** * Class Openverse_Client * - * @package WordPressdotorg\Pattern_Creator + * @package WordPressdotorg\Pattern_Directory */ class Openverse_Client { /** diff --git a/public_html/wp-content/plugins/pattern-creator/includes/openverse-rest-controller.php b/public_html/wp-content/plugins/pattern-directory/includes/openverse-rest-controller.php similarity index 98% rename from public_html/wp-content/plugins/pattern-creator/includes/openverse-rest-controller.php rename to public_html/wp-content/plugins/pattern-directory/includes/openverse-rest-controller.php index 2ce0398e7..421a916e8 100644 --- a/public_html/wp-content/plugins/pattern-creator/includes/openverse-rest-controller.php +++ b/public_html/wp-content/plugins/pattern-directory/includes/openverse-rest-controller.php @@ -4,7 +4,7 @@ * * This serves as a proxy layer to authenticate and cache the Openverse API requests. * - * @package WordPressdotorg\Pattern_Creator + * @package WordPressdotorg\Pattern_Directory */ class Openverse_REST_Controller extends WP_REST_Controller { /** diff --git a/public_html/wp-content/plugins/pattern-directory/includes/openverse.php b/public_html/wp-content/plugins/pattern-directory/includes/openverse.php new file mode 100644 index 000000000..4926a7932 --- /dev/null +++ b/public_html/wp-content/plugins/pattern-directory/includes/openverse.php @@ -0,0 +1,31 @@ +register_routes(); + + // Allow the post type labels through the `types` endpoint when viewing. + // This passes the value back to unauthenticated users, which prevents JS + // errors when the post-date block tries to use them. + register_rest_field( + 'type', // The object-type for the `types` endpoint. + 'labels', + array( + 'schema' => array( + 'description' => __( 'Human-readable labels for the post type for various contexts.', 'wporg-patterns' ), + 'type' => 'object', + 'context' => array( 'edit', 'view' ), + 'readonly' => true, + ), + ) + ); +} diff --git a/public_html/wp-content/plugins/pattern-directory/includes/pattern-post-type.php b/public_html/wp-content/plugins/pattern-directory/includes/pattern-post-type.php index f47b79bf2..baf05979a 100644 --- a/public_html/wp-content/plugins/pattern-directory/includes/pattern-post-type.php +++ b/public_html/wp-content/plugins/pattern-directory/includes/pattern-post-type.php @@ -2,8 +2,7 @@ namespace WordPressdotorg\Pattern_Directory\Pattern_Post_Type; -use Error, WP_Block_Type_Registry; -use function WordPressdotorg\Locales\{ get_locales, get_locales_with_english_names, get_locales_with_native_names }; +use function WordPressdotorg\Locales\{ get_locales }; use function WordPressdotorg\Pattern_Directory\Favorite\get_favorite_count; use const WordPressdotorg\Pattern_Directory\Pattern_Flag_Post_Type\TAX_TYPE as FLAG_REASON; @@ -16,9 +15,6 @@ add_action( 'init', __NAMESPACE__ . '\register_post_statuses' ); add_action( 'transition_post_status', __NAMESPACE__ . '\status_transitions', 10, 3 ); add_action( 'post_updated', __NAMESPACE__ . '\update_contains_block_types_meta' ); -add_action( 'enqueue_block_editor_assets', __NAMESPACE__ . '\enqueue_editor_assets' ); -add_filter( 'allowed_block_types_all', __NAMESPACE__ . '\remove_disallowed_blocks', 10, 2 ); -add_action( 'enqueue_block_editor_assets', __NAMESPACE__ . '\disable_block_directory', 0 ); add_filter( 'rest_' . POST_TYPE . '_collection_params', __NAMESPACE__ . '\filter_patterns_collection_params' ); add_filter( 'rest_' . POST_TYPE . '_query', __NAMESPACE__ . '\filter_patterns_rest_query', 10, 2 ); add_filter( 'user_has_cap', __NAMESPACE__ . '\set_pattern_caps' ); @@ -80,6 +76,7 @@ function register_post_type_data() { 'show_in_rest' => true, 'rest_base' => 'pattern-categories', 'show_admin_column' => true, + 'show_ui' => current_user_can( 'manage_options' ), 'rewrite' => array( 'slug' => 'categories', ), @@ -100,14 +97,14 @@ function register_post_type_data() { 'show_in_rest' => true, 'rest_base' => 'pattern-keywords', 'show_admin_column' => true, + 'show_ui' => current_user_can( 'manage_options' ), 'rewrite' => array( 'slug' => 'pattern-keywords', ), 'capabilities' => array( - 'assign_terms' => 'edit_patterns', - 'edit_terms' => 'edit_patterns', + 'assign_terms' => 'manage_options', + 'edit_terms' => 'manage_options', ), - 'labels' => array( 'name' => _x( 'Keywords (Internal)', 'taxonomy general name', 'wporg-patterns' ), 'singular_name' => _x( 'Keyword', 'taxonomy singular name', 'wporg-patterns' ), @@ -550,103 +547,6 @@ function can_edit_this_pattern( $allowed, $meta_key, $pattern_id ) { return current_user_can( 'edit_post', $pattern_id ); } -/** - * Enqueue scripts for the block editor. - * - * @throws Error If the build files don't exist. - */ -function enqueue_editor_assets() { - if ( function_exists( 'get_current_screen' ) && POST_TYPE !== get_current_screen()->id ) { - return; - } - - $dir = dirname( dirname( __FILE__ ) ); - - $script_asset_path = "$dir/build/pattern-post-type.asset.php"; - if ( ! file_exists( $script_asset_path ) ) { - throw new Error( 'You need to run `npm run start:directory` or `npm run build:directory` for the Pattern Directory.' ); - } - - $script_asset = require $script_asset_path; - wp_enqueue_script( - 'wporg-pattern-post-type', - plugins_url( 'build/pattern-post-type.js', dirname( __FILE__ ) ), - $script_asset['dependencies'], - $script_asset['version'], - true - ); - - wp_set_script_translations( 'wporg-pattern-post-type', 'wporg-patterns' ); - - $locales = ( is_admin() ) ? get_locales_with_english_names() : get_locales_with_native_names(); - - wp_add_inline_script( - 'wporg-pattern-post-type', - 'var wporgLocaleData = ' . wp_json_encode( $locales ) . ';', - 'before' - ); - - wp_enqueue_style( - 'wporg-pattern-post-type', - plugins_url( 'build/pattern-post-type.css', dirname( __FILE__ ) ), - array(), - $script_asset['version'], - ); -} - -/** - * Restrict the set of blocks allowed in block patterns. - * - * @param bool|array $allowed_block_types Array of block type slugs, or boolean to enable/disable all. - * @param WP_Block_Editor_Context $block_editor_context The post resource data. - * - * @return bool|array A (possibly) filtered list of block types. - */ -function remove_disallowed_blocks( $allowed_block_types, $block_editor_context ) { - $disallowed_block_types = array( - // Remove blocks that don't make sense in Block Patterns - 'core/freeform', // Classic block - 'core/legacy-widget', - 'core/more', - 'core/nextpage', - 'core/block', // Reusable blocks - 'core/shortcode', - 'core/template-part', - ); - - if ( isset( $block_editor_context->post ) && POST_TYPE === $block_editor_context->post->post_type ) { - // This can be true if all block types are allowed, so to filter them we - // need to get the list of all registered blocks first. - if ( true === $allowed_block_types ) { - $allowed_block_types = array_keys( WP_Block_Type_Registry::get_instance()->get_all_registered() ); - } - $allowed_block_types = array_diff( $allowed_block_types, $disallowed_block_types ); - - // Remove the "WordPress.org" blocks, like Global Header & Global Footer. - $allowed_block_types = array_filter( - $allowed_block_types, - function ( $block_type ) { - return 'wporg/' !== substr( $block_type, 0, 6 ); - } - ); - } - - return is_array( $allowed_block_types ) ? array_values( $allowed_block_types ) : $allowed_block_types; -} - -/** - * Disable the block directory in wp-admin for patterns. - * - * The block directory file isn't loaded on the frontend, so this is only needed for site admins who can open - * the pattern in the "real" wp-admin editor. - */ -function disable_block_directory() { - if ( is_admin() && POST_TYPE === get_post_type() ) { - remove_action( 'enqueue_block_editor_assets', 'wp_enqueue_editor_block_directory_assets' ); - remove_action( 'enqueue_block_editor_assets', 'gutenberg_enqueue_block_editor_assets_block_directory' ); - } -} - /** * Filter the collection parameters: * - set a new default for per_page. @@ -851,6 +751,8 @@ function get_block_pattern( $post ) { * @return array */ function set_pattern_caps( $user_caps ) { + global $current_screen; + // Set corresponding caps for all roles. $cap_args = array( 'capability_type' => array( 'pattern', 'patterns' ), @@ -868,7 +770,7 @@ function set_pattern_caps( $user_caps ) { } // Set caps to allow for front end pattern creation. - if ( is_user_logged_in() && ! is_admin() ) { + if ( is_user_logged_in() ) { $user_caps['read'] = true; $user_caps['publish_patterns'] = true; $user_caps['edit_patterns'] = true; @@ -878,6 +780,11 @@ function set_pattern_caps( $user_caps ) { // Note that `edit_others_patterns` & `delete_others_patterns` are separate capabilities. } + // Filter out `upload_files` from all non-admin users. + if ( ! isset( $user_caps['manage_options'] ) ) { + $user_caps['upload_files'] = false; + } + return $user_caps; } diff --git a/public_html/wp-content/plugins/pattern-directory/includes/pattern-validation.php b/public_html/wp-content/plugins/pattern-directory/includes/pattern-validation.php index 2163759c3..8c56735e0 100644 --- a/public_html/wp-content/plugins/pattern-directory/includes/pattern-validation.php +++ b/public_html/wp-content/plugins/pattern-directory/includes/pattern-validation.php @@ -184,7 +184,7 @@ function validate_title( $prepared_post, $request ) { return $prepared_post; } - $title = isset( $request['title'] ) ? $request['title'] : get_the_title( $prepared_post->ID ); + $title = isset( $request['title']['raw'] ) ? $request['title']['raw'] : get_the_title( $prepared_post->ID ); // A title exists, but is empty -- invalid. if ( isset( $title ) && empty( trim( $title ) ) ) { diff --git a/public_html/wp-content/plugins/pattern-directory/package.json b/public_html/wp-content/plugins/pattern-directory/package.json index 9186d4f4d..c9dcbf9a8 100644 --- a/public_html/wp-content/plugins/pattern-directory/package.json +++ b/public_html/wp-content/plugins/pattern-directory/package.json @@ -26,7 +26,8 @@ "@wordpress/i18n": "5.14.0", "@wordpress/notices": "5.14.0", "@wordpress/plugins": "7.14.0", - "@wordpress/scripts": "30.7.0" + "@wordpress/scripts": "30.7.0", + "clsx": "2.1.1" }, "eslintConfig": { "extends": "../../../../.eslintrc.js" diff --git a/public_html/wp-content/plugins/pattern-directory/src/back-button/index.js b/public_html/wp-content/plugins/pattern-directory/src/back-button/index.js new file mode 100644 index 000000000..c0efb5165 --- /dev/null +++ b/public_html/wp-content/plugins/pattern-directory/src/back-button/index.js @@ -0,0 +1,28 @@ +/* global wporgBlockPattern */ +/** + * WordPress dependencies + */ +import { __ } from '@wordpress/i18n'; +import { + /* eslint-disable-next-line @wordpress/no-unsafe-wp-apis */ + __experimentalMainDashboardButton as MainDashboardButton, +} from '@wordpress/edit-post'; +import { Button } from '@wordpress/components'; +import { close } from '@wordpress/icons'; + +const BackButton = () => { + return ( + + + + ); +}; + +export default BackButton; diff --git a/public_html/wp-content/plugins/pattern-creator/src/components/media-placeholder/index.js b/public_html/wp-content/plugins/pattern-directory/src/media-placeholder/index.js similarity index 91% rename from public_html/wp-content/plugins/pattern-creator/src/components/media-placeholder/index.js rename to public_html/wp-content/plugins/pattern-directory/src/media-placeholder/index.js index 583417816..28280cdc7 100644 --- a/public_html/wp-content/plugins/pattern-creator/src/components/media-placeholder/index.js +++ b/public_html/wp-content/plugins/pattern-directory/src/media-placeholder/index.js @@ -1,7 +1,7 @@ /** * External dependencies */ -import classnames from 'classnames'; +import clsx from 'clsx'; /** * WordPress dependencies @@ -23,7 +23,6 @@ export default function MediaPlaceholder( { multiple = false, notices, onSelect, - placeholder, style, value = {}, } ) { @@ -65,7 +64,7 @@ export default function MediaPlaceholder( { instructions = __( 'The pattern directory does not support this media type yet.', 'wporg-patterns' ); } - const placeholderClassName = classnames( 'block-editor-media-placeholder', className, { + const placeholderClassName = clsx( 'block-editor-media-placeholder', className, { 'is-appender': isAppender, } ); @@ -84,9 +83,8 @@ export default function MediaPlaceholder( { ); }; - const renderPlaceholder = placeholder ?? defaultRenderPlaceholder; - const content = renderPlaceholder( + const content = defaultRenderPlaceholder( { items.map( ( item ) => { - const classes = classnames( { + const classes = clsx( { 'pattern-openverse__grid-item': true, 'is-selected': includesById( selected, item ), } ); diff --git a/public_html/wp-content/plugins/pattern-creator/src/components/openverse/grid.js b/public_html/wp-content/plugins/pattern-directory/src/openverse/grid.js similarity index 100% rename from public_html/wp-content/plugins/pattern-creator/src/components/openverse/grid.js rename to public_html/wp-content/plugins/pattern-directory/src/openverse/grid.js diff --git a/public_html/wp-content/plugins/pattern-creator/src/components/openverse/index.js b/public_html/wp-content/plugins/pattern-directory/src/openverse/index.js similarity index 56% rename from public_html/wp-content/plugins/pattern-creator/src/components/openverse/index.js rename to public_html/wp-content/plugins/pattern-directory/src/openverse/index.js index 50bd8784a..4b65ffb29 100644 --- a/public_html/wp-content/plugins/pattern-creator/src/components/openverse/index.js +++ b/public_html/wp-content/plugins/pattern-directory/src/openverse/index.js @@ -2,20 +2,14 @@ * WordPress dependencies */ import { __ } from '@wordpress/i18n'; -import { - Button, - Modal, - SearchControl, - /* @todo Remove StyleProvider workaround when https://github.com/WordPress/gutenberg/pull/36261 is released. */ - /* eslint-disable-next-line @wordpress/no-unsafe-wp-apis -- Experimental is OK. */ - __experimentalStyleProvider as StyleProvider, -} from '@wordpress/components'; +import { Button, Modal, SearchControl } from '@wordpress/components'; import { useState } from '@wordpress/element'; /** * Internal dependencies */ import OpenverseGrid from './grid'; +import './modal.scss'; const suggestedTerms = [ __( 'Mountains', 'wporg-patterns' ), @@ -29,29 +23,27 @@ function OpenverseExplorer( { onClose, ...props } ) { const [ searchTerm, setSearchTerm ] = useState( '' ); return ( - -
-
- - { searchTerm.length ? null : ( -

- { __( 'Suggestions', 'wporg-patterns' ) } - { suggestedTerms.map( ( term, i ) => ( - - ) ) } -

- ) } -
- +
+
+ + { searchTerm.length ? null : ( +

+ { __( 'Suggestions', 'wporg-patterns' ) } + { suggestedTerms.map( ( term, i ) => ( + + ) ) } +

+ ) }
- + +
); } diff --git a/public_html/wp-content/plugins/pattern-creator/src/components/openverse/style.scss b/public_html/wp-content/plugins/pattern-directory/src/openverse/modal.scss similarity index 90% rename from public_html/wp-content/plugins/pattern-creator/src/components/openverse/style.scss rename to public_html/wp-content/plugins/pattern-directory/src/openverse/modal.scss index 58f290d0d..0a1cbfb4c 100644 --- a/public_html/wp-content/plugins/pattern-creator/src/components/openverse/style.scss +++ b/public_html/wp-content/plugins/pattern-directory/src/openverse/modal.scss @@ -1,3 +1,14 @@ +$grid-unit: 8px; +$grid-unit-20: 2 * $grid-unit; // 16px +$grid-unit-30: 3 * $grid-unit; // 24px +$grid-unit-40: 4 * $grid-unit; // 32px + +$white: #fff; +$gray-100: #f0f0f0; +$gray-200: #e0e0e0; +$gray-300: #ddd; +$gray-900: #1e1e1e; + .pattern-openverse__modal { width: 90vw; min-height: 90vh; @@ -21,7 +32,7 @@ display: block; height: 40px; width: 140px; - background: url(./components/openverse/powered-by-openverse.png) no-repeat center; + background: url(./powered-by-openverse.png) no-repeat center; background-size: contain; } } @@ -95,7 +106,7 @@ &.is-selected { &::after { - box-shadow: inset 0 0 0 3px $black; + box-shadow: inset 0 0 0 3px $gray-900; } &::before { @@ -136,7 +147,7 @@ align-items: center; gap: 0.25rem; - @include break-small() { + @media (min-width: 600px) { gap: 0.75rem; } } @@ -170,12 +181,12 @@ color: $white; } - @include break-small() { + @media (min-width: 600px) { padding: 0.75rem; } } -@media (max-width: #{ ($break-small) }) { +@media (max-width: 600px) { .pattern-openverse__pagination-item-previous-page, .pattern-openverse__pagination-item-next-page { .pattern-openverse__pagination-link span[aria-hidden] { diff --git a/public_html/wp-content/plugins/pattern-creator/src/components/openverse/pagination.js b/public_html/wp-content/plugins/pattern-directory/src/openverse/pagination.js similarity index 100% rename from public_html/wp-content/plugins/pattern-creator/src/components/openverse/pagination.js rename to public_html/wp-content/plugins/pattern-directory/src/openverse/pagination.js diff --git a/public_html/wp-content/plugins/pattern-creator/src/components/openverse/powered-by-openverse.png b/public_html/wp-content/plugins/pattern-directory/src/openverse/powered-by-openverse.png similarity index 100% rename from public_html/wp-content/plugins/pattern-creator/src/components/openverse/powered-by-openverse.png rename to public_html/wp-content/plugins/pattern-directory/src/openverse/powered-by-openverse.png diff --git a/public_html/wp-content/plugins/pattern-creator/src/components/openverse/utils.js b/public_html/wp-content/plugins/pattern-directory/src/openverse/utils.js similarity index 100% rename from public_html/wp-content/plugins/pattern-creator/src/components/openverse/utils.js rename to public_html/wp-content/plugins/pattern-directory/src/openverse/utils.js diff --git a/public_html/wp-content/plugins/pattern-directory/src/pattern-post-type/details.js b/public_html/wp-content/plugins/pattern-directory/src/pattern-details/index.js similarity index 59% rename from public_html/wp-content/plugins/pattern-directory/src/pattern-post-type/details.js rename to public_html/wp-content/plugins/pattern-directory/src/pattern-details/index.js index 7c9a923f4..760779917 100644 --- a/public_html/wp-content/plugins/pattern-directory/src/pattern-post-type/details.js +++ b/public_html/wp-content/plugins/pattern-directory/src/pattern-details/index.js @@ -5,8 +5,15 @@ import { __ } from '@wordpress/i18n'; import { PluginDocumentSettingPanel } from '@wordpress/edit-post'; import { ComboboxControl, FormTokenField, TextControl, TextareaControl } from '@wordpress/components'; import { useDispatch, useSelect } from '@wordpress/data'; +import { store as coreStore } from '@wordpress/core-data'; import { store as editorStore } from '@wordpress/editor'; +/** + * Internal dependencies + */ +import PatternCategoriesControl from './pattern-categories-control'; +import './index.scss'; + const KEYWORD_SLUG = 'wpop_keywords'; const DESCRIPTION_SLUG = 'wpop_description'; const LOCALE_SLUG = 'wpop_locale'; @@ -22,10 +29,11 @@ for ( const [ key, value ] of Object.entries( localeData ) ) { const PatternDetails = () => { const { editPost } = useDispatch( 'core/editor' ); - const { description, keywords, locale, meta, title } = useSelect( ( select ) => { + const { categories, description, keywords, locale, meta, title } = useSelect( ( select ) => { const { getEditedPostAttribute } = select( editorStore ); const _meta = getEditedPostAttribute( 'meta' ) || {}; return { + categories: getEditedPostAttribute( 'pattern-categories' ), description: _meta[ DESCRIPTION_SLUG ], keywords: _meta[ KEYWORD_SLUG ].split( ', ' ).filter( ( item ) => item.length ), locale: _meta[ LOCALE_SLUG ], @@ -33,13 +41,18 @@ const PatternDetails = () => { title: getEditedPostAttribute( 'title' ) || '', }; } ); + const canModeratePatterns = useSelect( ( select ) => { + return select( coreStore ).canUser( 'create', 'posts' ) ?? false; + }, [] ); return ( +

{ __( 'Pattern Details', 'wporg-patterns' ) }

{ 'wporg-patterns' ) } /> -
+
+

{ __( 'Categories', 'wporg-patterns' ) }

- { __( 'Keywords', 'wporg-patterns' ) } + { __( + 'Patterns are grouped into defined categories to help people browse.', + 'wporg-patterns' + ) }

+ { + editPost( { 'pattern-categories': newValue } ); + } } + /> +
+
+

{ __( 'Keywords', 'wporg-patterns' ) }

{ __( 'Keywords are words or short phrases that will help people find your pattern. There is a maximum of 10 keywords.', @@ -93,24 +119,26 @@ const PatternDetails = () => { tokenizeOnSpace={ false } />

- - editPost( { - meta: { - ...meta, - [ LOCALE_SLUG ]: newValue, - }, - } ) - } - help={ __( - 'The language field is used to help users find patterns that were created in their preferred language.', - 'wporg-patterns' - ) } - /> + { canModeratePatterns && ( + + editPost( { + meta: { + ...meta, + [ LOCALE_SLUG ]: newValue, + }, + } ) + } + help={ __( + 'The language field is used to help users find patterns that were created in their preferred language.', + 'wporg-patterns' + ) } + /> + ) } ); }; diff --git a/public_html/wp-content/plugins/pattern-directory/src/pattern-details/index.scss b/public_html/wp-content/plugins/pattern-directory/src/pattern-details/index.scss new file mode 100644 index 000000000..57d45b3e4 --- /dev/null +++ b/public_html/wp-content/plugins/pattern-directory/src/pattern-details/index.scss @@ -0,0 +1,21 @@ +.wporg-pattern-details h2 { + margin-block-start: 0; +} + +.wporg-pattern-details h3 { + font-size: 13px; + text-transform: none; +} + +.wporg-pattern-details__panel { + position: relative; + padding-block-start: 12px; + + &::before { + content: ""; + position: absolute; + inset: 0 -16px auto; + height: 1px; + background-color: #ddd; + } +} diff --git a/public_html/wp-content/plugins/pattern-creator/src/components/pattern-categories-control/index.js b/public_html/wp-content/plugins/pattern-directory/src/pattern-details/pattern-categories-control.js similarity index 99% rename from public_html/wp-content/plugins/pattern-creator/src/components/pattern-categories-control/index.js rename to public_html/wp-content/plugins/pattern-directory/src/pattern-details/pattern-categories-control.js index dbb27b701..52760329d 100644 --- a/public_html/wp-content/plugins/pattern-creator/src/components/pattern-categories-control/index.js +++ b/public_html/wp-content/plugins/pattern-directory/src/pattern-details/pattern-categories-control.js @@ -18,7 +18,7 @@ import { useSelect } from '@wordpress/data'; /** * Internal dependencies */ -import { CATEGORY_SLUG } from '../../store'; +import { CATEGORY_SLUG } from '../settings'; /** * Module Constants diff --git a/public_html/wp-content/plugins/pattern-directory/src/pattern-post-type.js b/public_html/wp-content/plugins/pattern-directory/src/pattern-post-type.js index ab3fa15fc..d6dd5026e 100644 --- a/public_html/wp-content/plugins/pattern-directory/src/pattern-post-type.js +++ b/public_html/wp-content/plugins/pattern-directory/src/pattern-post-type.js @@ -1,13 +1,68 @@ /** * External dependencies */ +import { addFilter } from '@wordpress/hooks'; import { registerPlugin } from '@wordpress/plugins'; +import { useDispatch, useSelect } from '@wordpress/data'; +import { store as editPostStore } from '@wordpress/edit-post'; +import { store as editorStore } from '@wordpress/editor'; +import { store as coreStore } from '@wordpress/core-data'; +import { useEffect } from '@wordpress/element'; /** * Internal dependencies */ -import PluginWrapper from './pattern-post-type/'; +import BackButton from './back-button'; +import { NAMESPACE } from './settings'; +import PatternDetails from './pattern-details'; +import { UnlistButton, UnlistNotice } from './unlist-button'; +import MediaPlaceholder from './media-placeholder'; +import OpenverseGallery from './openverse'; -registerPlugin( 'pattern-post-type', { +const PluginWrapper = () => { + const { canModeratePatterns, isDetailsPanelOpen, isFullscreenMode } = useSelect( ( select ) => { + return { + // If a user can create posts, they have a role on the site (moderator). + canModeratePatterns: select( coreStore ).canUser( 'create', 'posts' ), + isDetailsPanelOpen: select( editorStore ).isEditorPanelOpened( NAMESPACE + '/pattern-details' ), + isFullscreenMode: select( editPostStore ).isFeatureActive( 'fullscreenMode' ), + }; + }, [] ); + const { toggleFeature } = useDispatch( editPostStore ); + const { removeEditorPanel, toggleEditorPanelOpened } = useDispatch( editorStore ); + + useEffect( () => { + if ( ! isFullscreenMode ) { + toggleFeature( 'fullscreenMode' ); + } + if ( false === canModeratePatterns ) { + removeEditorPanel( 'post-status' ); + } + if ( ! isDetailsPanelOpen ) { + toggleEditorPanelOpened( NAMESPACE + '/pattern-details' ); + } + }, [ + isFullscreenMode, + toggleFeature, + canModeratePatterns, + removeEditorPanel, + isDetailsPanelOpen, + toggleEditorPanelOpened, + ] ); + + return ( + <> + { canModeratePatterns && } + + + + + ); +}; + +registerPlugin( NAMESPACE, { render: PluginWrapper, } ); + +addFilter( 'editor.MediaPlaceholder', 'wporg/patterns/components/media-upload', () => MediaPlaceholder, 100 ); +addFilter( 'editor.MediaUpload', 'wporg-patterns/openverse-media-upload', () => OpenverseGallery, 100 ); diff --git a/public_html/wp-content/plugins/pattern-directory/src/pattern-post-type/index.js b/public_html/wp-content/plugins/pattern-directory/src/pattern-post-type/index.js deleted file mode 100644 index 036043164..000000000 --- a/public_html/wp-content/plugins/pattern-directory/src/pattern-post-type/index.js +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Internal dependencies - */ -import { UnlistButton, UnlistNotice } from './unlist-button'; -import PatternDetails from './details'; - -const PluginWrapper = () => { - return ( - <> - - - - - ); -}; - -export default PluginWrapper; diff --git a/public_html/wp-content/plugins/pattern-directory/src/pattern-post-type/settings.js b/public_html/wp-content/plugins/pattern-directory/src/pattern-post-type/settings.js deleted file mode 100644 index 0e31942b8..000000000 --- a/public_html/wp-content/plugins/pattern-directory/src/pattern-post-type/settings.js +++ /dev/null @@ -1 +0,0 @@ -export const UNLISTED_STATUS = 'unlisted'; diff --git a/public_html/wp-content/plugins/pattern-directory/src/settings.js b/public_html/wp-content/plugins/pattern-directory/src/settings.js new file mode 100644 index 000000000..a171285ab --- /dev/null +++ b/public_html/wp-content/plugins/pattern-directory/src/settings.js @@ -0,0 +1,3 @@ +export const UNLISTED_STATUS = 'unlisted'; +export const NAMESPACE = 'wporg-pattern'; +export const CATEGORY_SLUG = 'wporg-pattern-category'; diff --git a/public_html/wp-content/plugins/pattern-creator/src/components/submission-modal/images/circle.svg b/public_html/wp-content/plugins/pattern-directory/src/submission-modal/images/circle.svg similarity index 100% rename from public_html/wp-content/plugins/pattern-creator/src/components/submission-modal/images/circle.svg rename to public_html/wp-content/plugins/pattern-directory/src/submission-modal/images/circle.svg diff --git a/public_html/wp-content/plugins/pattern-creator/src/components/submission-modal/images/square.svg b/public_html/wp-content/plugins/pattern-directory/src/submission-modal/images/square.svg similarity index 100% rename from public_html/wp-content/plugins/pattern-creator/src/components/submission-modal/images/square.svg rename to public_html/wp-content/plugins/pattern-directory/src/submission-modal/images/square.svg diff --git a/public_html/wp-content/plugins/pattern-creator/src/components/submission-modal/images/triangle.svg b/public_html/wp-content/plugins/pattern-directory/src/submission-modal/images/triangle.svg similarity index 100% rename from public_html/wp-content/plugins/pattern-creator/src/components/submission-modal/images/triangle.svg rename to public_html/wp-content/plugins/pattern-directory/src/submission-modal/images/triangle.svg diff --git a/public_html/wp-content/plugins/pattern-creator/src/components/submission-modal/index.js b/public_html/wp-content/plugins/pattern-directory/src/submission-modal/index.js similarity index 98% rename from public_html/wp-content/plugins/pattern-creator/src/components/submission-modal/index.js rename to public_html/wp-content/plugins/pattern-directory/src/submission-modal/index.js index 1227bb1a4..347d011fd 100644 --- a/public_html/wp-content/plugins/pattern-creator/src/components/submission-modal/index.js +++ b/public_html/wp-content/plugins/pattern-directory/src/submission-modal/index.js @@ -1,3 +1,4 @@ +/* global wporgLocale, wporgBlockPattern */ /** * WordPress dependencies */ @@ -10,6 +11,11 @@ import { store as editorStore } from '@wordpress/editor'; import { store as noticesStore } from '@wordpress/notices'; import { useDispatch, useSelect } from '@wordpress/data'; +/** + * Internal Dependencies + */ +import './submission-modal.scss'; + const ForwardButton = ( { children, disabled, onClick } ) => (