@eightshift/frontend-libs-tailwind 1.5.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.gitattributes +8 -30
- package/.github/workflows/ci.yml +2 -1
- package/CHANGELOG.md +29 -1
- package/bun.lock +1009 -0
- package/package.json +16 -26
- package/schemas/globalManifest.json +5 -0
- package/scripts/components/picker-placeholder.js +1 -1
- package/scripts/editor/colors.js +2 -2
- package/scripts/editor/options.js +1 -1
- package/scripts/editor/registration.js +4 -7
- package/scripts/editor/store.js +19 -0
- package/scripts/helpers/cookies.js +24 -16
- package/scripts/plugins/yoast-seo.js +71 -45
- package/webpack/base.mjs +0 -5
- package/webpack/helpers.mjs +1 -5
- package/webpack/index.mjs +0 -1
- package/webpack/project.mjs +0 -5
- package/blocks/init/assets/application-admin.js +0 -10
- package/blocks/init/assets/application.js +0 -13
- package/blocks/init/assets/fonts/fraunces-italic-latin-extended.woff2 +0 -0
- package/blocks/init/assets/fonts/fraunces-italic-latin.woff2 +0 -0
- package/blocks/init/assets/fonts/fraunces-latin-extended.woff2 +0 -0
- package/blocks/init/assets/fonts/fraunces-latin.woff2 +0 -0
- package/blocks/init/assets/fonts/noto-sans-italic-latin-extended.woff2 +0 -0
- package/blocks/init/assets/fonts/noto-sans-italic-latin.woff2 +0 -0
- package/blocks/init/assets/fonts/noto-sans-latin-extended.woff2 +0 -0
- package/blocks/init/assets/fonts/noto-sans-latin.woff2 +0 -0
- package/blocks/init/assets/images/index.js +0 -5
- package/blocks/init/assets/scripts/application-admin.js +0 -7
- package/blocks/init/assets/scripts/application.js +0 -3
- package/blocks/init/assets/scripts/theme-colors.js +0 -39
- package/blocks/init/assets/styles/application-admin.css +0 -6
- package/blocks/init/assets/styles/application.css +0 -3
- package/blocks/init/src/Blocks/assets/application-blocks-editor.js +0 -14
- package/blocks/init/src/Blocks/assets/application-blocks-frontend.js +0 -13
- package/blocks/init/src/Blocks/assets/application-blocks.js +0 -9
- package/blocks/init/src/Blocks/assets/scripts/application-blocks-editor.js +0 -65
- package/blocks/init/src/Blocks/assets/scripts/application-blocks-frontend.js +0 -24
- package/blocks/init/src/Blocks/assets/scripts/link-section-editor.js +0 -262
- package/blocks/init/src/Blocks/assets/scripts/shared.js +0 -25
- package/blocks/init/src/Blocks/assets/styles/application-blocks-editor.css +0 -15
- package/blocks/init/src/Blocks/assets/styles/application-blocks-frontend.css +0 -9
- package/blocks/init/src/Blocks/assets/styles/application-blocks.css +0 -1
- package/blocks/init/src/Blocks/assets/styles/editor/editor-overrides.css +0 -15
- package/blocks/init/src/Blocks/assets/styles/fonts.css +0 -90
- package/blocks/init/src/Blocks/assets/styles/tailwind.css +0 -30
- package/blocks/init/src/Blocks/components/admin-theme-options/admin-theme-options.php +0 -20
- package/blocks/init/src/Blocks/components/admin-theme-options/assets-admin/index.js +0 -36
- package/blocks/init/src/Blocks/components/admin-theme-options/assets-admin/pages/parts.js +0 -56
- package/blocks/init/src/Blocks/components/admin-theme-options/manifest.json +0 -5
- package/blocks/init/src/Blocks/components/button/assets/index.js +0 -22
- package/blocks/init/src/Blocks/components/button/button.php +0 -88
- package/blocks/init/src/Blocks/components/button/components/button-editor.js +0 -36
- package/blocks/init/src/Blocks/components/button/components/button-options.js +0 -134
- package/blocks/init/src/Blocks/components/button/manifest.json +0 -302
- package/blocks/init/src/Blocks/components/card/card.php +0 -42
- package/blocks/init/src/Blocks/components/card/components/card-editor.js +0 -43
- package/blocks/init/src/Blocks/components/card/components/card-options.js +0 -55
- package/blocks/init/src/Blocks/components/card/manifest.json +0 -111
- package/blocks/init/src/Blocks/components/head/head.php +0 -52
- package/blocks/init/src/Blocks/components/head/manifest.json +0 -17
- package/blocks/init/src/Blocks/components/heading/components/heading-editor.js +0 -26
- package/blocks/init/src/Blocks/components/heading/components/heading-options.js +0 -62
- package/blocks/init/src/Blocks/components/heading/heading.php +0 -45
- package/blocks/init/src/Blocks/components/heading/manifest.json +0 -76
- package/blocks/init/src/Blocks/components/hero/components/hero-editor.js +0 -42
- package/blocks/init/src/Blocks/components/hero/components/hero-options.js +0 -100
- package/blocks/init/src/Blocks/components/hero/hero.php +0 -45
- package/blocks/init/src/Blocks/components/hero/manifest.json +0 -96
- package/blocks/init/src/Blocks/components/icon/components/icon-editor.js +0 -23
- package/blocks/init/src/Blocks/components/icon/components/icon-options.js +0 -65
- package/blocks/init/src/Blocks/components/icon/icon.php +0 -53
- package/blocks/init/src/Blocks/components/icon/manifest.json +0 -1238
- package/blocks/init/src/Blocks/components/image/components/image-editor.js +0 -64
- package/blocks/init/src/Blocks/components/image/components/image-options.js +0 -111
- package/blocks/init/src/Blocks/components/image/image.php +0 -68
- package/blocks/init/src/Blocks/components/image/manifest.json +0 -125
- package/blocks/init/src/Blocks/components/list/components/list-editor.js +0 -30
- package/blocks/init/src/Blocks/components/list/components/list-options.js +0 -62
- package/blocks/init/src/Blocks/components/list/list.php +0 -32
- package/blocks/init/src/Blocks/components/list/manifest.json +0 -127
- package/blocks/init/src/Blocks/components/load-more/assets/index.js +0 -19
- package/blocks/init/src/Blocks/components/load-more/assets/load-more.js +0 -146
- package/blocks/init/src/Blocks/components/load-more/components/load-more-editor.js +0 -14
- package/blocks/init/src/Blocks/components/load-more/components/load-more-options.js +0 -19
- package/blocks/init/src/Blocks/components/load-more/load-more.php +0 -47
- package/blocks/init/src/Blocks/components/load-more/manifest.json +0 -39
- package/blocks/init/src/Blocks/components/modal/assets/index.js +0 -27
- package/blocks/init/src/Blocks/components/modal/manifest.json +0 -48
- package/blocks/init/src/Blocks/components/modal/modal.php +0 -46
- package/blocks/init/src/Blocks/components/paragraph/components/paragraph-editor.js +0 -38
- package/blocks/init/src/Blocks/components/paragraph/components/paragraph-options.js +0 -48
- package/blocks/init/src/Blocks/components/paragraph/manifest.json +0 -81
- package/blocks/init/src/Blocks/components/paragraph/paragraph.php +0 -33
- package/blocks/init/src/Blocks/components/post-header/manifest.json +0 -5
- package/blocks/init/src/Blocks/components/post-header/post-header.php +0 -24
- package/blocks/init/src/Blocks/components/quote/components/quote-editor.js +0 -53
- package/blocks/init/src/Blocks/components/quote/components/quote-options.js +0 -29
- package/blocks/init/src/Blocks/components/quote/manifest.json +0 -47
- package/blocks/init/src/Blocks/components/quote/quote.php +0 -49
- package/blocks/init/src/Blocks/components/share/assets/index.js +0 -39
- package/blocks/init/src/Blocks/components/share/components/share-editor.js +0 -28
- package/blocks/init/src/Blocks/components/share/components/share-options.js +0 -112
- package/blocks/init/src/Blocks/components/share/manifest.json +0 -72
- package/blocks/init/src/Blocks/components/share/share.php +0 -69
- package/blocks/init/src/Blocks/components/tracking-before-body-end/manifest.json +0 -5
- package/blocks/init/src/Blocks/components/tracking-before-body-end/tracking-before-body-end.php +0 -9
- package/blocks/init/src/Blocks/components/tracking-head/manifest.json +0 -5
- package/blocks/init/src/Blocks/components/tracking-head/tracking-head.php +0 -9
- package/blocks/init/src/Blocks/components/video/components/video-editor.js +0 -74
- package/blocks/init/src/Blocks/components/video/components/video-options.js +0 -279
- package/blocks/init/src/Blocks/components/video/manifest.json +0 -120
- package/blocks/init/src/Blocks/components/video/video.php +0 -70
- package/blocks/init/src/Blocks/custom/accordion/accordion-block.js +0 -15
- package/blocks/init/src/Blocks/custom/accordion/accordion.php +0 -28
- package/blocks/init/src/Blocks/custom/accordion/assets/index.js +0 -37
- package/blocks/init/src/Blocks/custom/accordion/components/accordion-editor.js +0 -22
- package/blocks/init/src/Blocks/custom/accordion/components/accordion-options.js +0 -18
- package/blocks/init/src/Blocks/custom/accordion/manifest.json +0 -32
- package/blocks/init/src/Blocks/custom/accordion-item/accordion-item-block.js +0 -19
- package/blocks/init/src/Blocks/custom/accordion-item/accordion-item.php +0 -46
- package/blocks/init/src/Blocks/custom/accordion-item/components/accordion-item-editor.js +0 -60
- package/blocks/init/src/Blocks/custom/accordion-item/manifest.json +0 -69
- package/blocks/init/src/Blocks/custom/button/button-block.js +0 -13
- package/blocks/init/src/Blocks/custom/button/button.php +0 -11
- package/blocks/init/src/Blocks/custom/button/components/button-editor.js +0 -12
- package/blocks/init/src/Blocks/custom/button/components/button-options.js +0 -12
- package/blocks/init/src/Blocks/custom/button/manifest.json +0 -18
- package/blocks/init/src/Blocks/custom/card/card-block.js +0 -13
- package/blocks/init/src/Blocks/custom/card/card.php +0 -11
- package/blocks/init/src/Blocks/custom/card/components/card-editor.js +0 -12
- package/blocks/init/src/Blocks/custom/card/components/card-options.js +0 -15
- package/blocks/init/src/Blocks/custom/card/manifest.json +0 -18
- package/blocks/init/src/Blocks/custom/carousel/assets/index.js +0 -46
- package/blocks/init/src/Blocks/custom/carousel/assets/navigation.js +0 -31
- package/blocks/init/src/Blocks/custom/carousel/assets/pagination.js +0 -40
- package/blocks/init/src/Blocks/custom/carousel/carousel-block.js +0 -21
- package/blocks/init/src/Blocks/custom/carousel/carousel.php +0 -61
- package/blocks/init/src/Blocks/custom/carousel/components/carousel-editor.js +0 -25
- package/blocks/init/src/Blocks/custom/carousel/components/carousel-options.js +0 -47
- package/blocks/init/src/Blocks/custom/carousel/manifest.json +0 -130
- package/blocks/init/src/Blocks/custom/column/column-block.js +0 -21
- package/blocks/init/src/Blocks/custom/column/column-hooks.js +0 -32
- package/blocks/init/src/Blocks/custom/column/column.php +0 -21
- package/blocks/init/src/Blocks/custom/column/components/column-editor.js +0 -22
- package/blocks/init/src/Blocks/custom/column/components/column-options.js +0 -580
- package/blocks/init/src/Blocks/custom/column/manifest.json +0 -625
- package/blocks/init/src/Blocks/custom/columns/columns-block.js +0 -20
- package/blocks/init/src/Blocks/custom/columns/columns.php +0 -21
- package/blocks/init/src/Blocks/custom/columns/components/columns-editor.js +0 -81
- package/blocks/init/src/Blocks/custom/columns/components/columns-options.js +0 -104
- package/blocks/init/src/Blocks/custom/columns/manifest.json +0 -581
- package/blocks/init/src/Blocks/custom/featured-content/components/featured-content-editor.js +0 -28
- package/blocks/init/src/Blocks/custom/featured-content/components/featured-content-options.js +0 -248
- package/blocks/init/src/Blocks/custom/featured-content/featured-content-block.js +0 -13
- package/blocks/init/src/Blocks/custom/featured-content/featured-content.php +0 -139
- package/blocks/init/src/Blocks/custom/featured-content/manifest.json +0 -131
- package/blocks/init/src/Blocks/custom/featured-content/partials/cards.php +0 -39
- package/blocks/init/src/Blocks/custom/group/components/group-editor.js +0 -6
- package/blocks/init/src/Blocks/custom/group/group-block.js +0 -14
- package/blocks/init/src/Blocks/custom/group/group.php +0 -10
- package/blocks/init/src/Blocks/custom/group/manifest.json +0 -32
- package/blocks/init/src/Blocks/custom/heading/components/heading-editor.js +0 -15
- package/blocks/init/src/Blocks/custom/heading/components/heading-options.js +0 -38
- package/blocks/init/src/Blocks/custom/heading/heading-block.js +0 -13
- package/blocks/init/src/Blocks/custom/heading/heading-transforms.js +0 -26
- package/blocks/init/src/Blocks/custom/heading/heading.php +0 -15
- package/blocks/init/src/Blocks/custom/heading/manifest.json +0 -79
- package/blocks/init/src/Blocks/custom/hero/components/hero-editor.js +0 -12
- package/blocks/init/src/Blocks/custom/hero/components/hero-options.js +0 -14
- package/blocks/init/src/Blocks/custom/hero/hero-block.js +0 -13
- package/blocks/init/src/Blocks/custom/hero/hero.php +0 -11
- package/blocks/init/src/Blocks/custom/hero/manifest.json +0 -17
- package/blocks/init/src/Blocks/custom/image/components/image-editor.js +0 -12
- package/blocks/init/src/Blocks/custom/image/components/image-options.js +0 -14
- package/blocks/init/src/Blocks/custom/image/image-block.js +0 -13
- package/blocks/init/src/Blocks/custom/image/image.php +0 -11
- package/blocks/init/src/Blocks/custom/image/manifest.json +0 -33
- package/blocks/init/src/Blocks/custom/list/components/list-editor.js +0 -14
- package/blocks/init/src/Blocks/custom/list/components/list-options.js +0 -39
- package/blocks/init/src/Blocks/custom/list/list-block.js +0 -13
- package/blocks/init/src/Blocks/custom/list/list.php +0 -15
- package/blocks/init/src/Blocks/custom/list/manifest.json +0 -58
- package/blocks/init/src/Blocks/custom/map/assets/index.js +0 -20
- package/blocks/init/src/Blocks/custom/map/assets/map-controller.js +0 -41
- package/blocks/init/src/Blocks/custom/map/assets/utils.js +0 -161
- package/blocks/init/src/Blocks/custom/map/components/map-components.js +0 -403
- package/blocks/init/src/Blocks/custom/map/components/map-editor.js +0 -56
- package/blocks/init/src/Blocks/custom/map/components/map-options.js +0 -550
- package/blocks/init/src/Blocks/custom/map/manifest.json +0 -79
- package/blocks/init/src/Blocks/custom/map/map-block.js +0 -13
- package/blocks/init/src/Blocks/custom/map/map.php +0 -52
- package/blocks/init/src/Blocks/custom/map/styles.css +0 -2
- package/blocks/init/src/Blocks/custom/modal/components/modal-editor.js +0 -90
- package/blocks/init/src/Blocks/custom/modal/manifest.json +0 -51
- package/blocks/init/src/Blocks/custom/modal/modal-block.js +0 -14
- package/blocks/init/src/Blocks/custom/modal/modal.php +0 -20
- package/blocks/init/src/Blocks/custom/paragraph/components/paragraph-editor.js +0 -17
- package/blocks/init/src/Blocks/custom/paragraph/components/paragraph-options.js +0 -38
- package/blocks/init/src/Blocks/custom/paragraph/manifest.json +0 -82
- package/blocks/init/src/Blocks/custom/paragraph/paragraph-block.js +0 -13
- package/blocks/init/src/Blocks/custom/paragraph/paragraph-transforms.js +0 -46
- package/blocks/init/src/Blocks/custom/paragraph/paragraph.php +0 -15
- package/blocks/init/src/Blocks/custom/quote/components/quote-editor.js +0 -12
- package/blocks/init/src/Blocks/custom/quote/components/quote-options.js +0 -14
- package/blocks/init/src/Blocks/custom/quote/manifest.json +0 -17
- package/blocks/init/src/Blocks/custom/quote/quote-block.js +0 -13
- package/blocks/init/src/Blocks/custom/quote/quote.php +0 -13
- package/blocks/init/src/Blocks/custom/share/components/share-editor.js +0 -6
- package/blocks/init/src/Blocks/custom/share/components/share-options.js +0 -12
- package/blocks/init/src/Blocks/custom/share/manifest.json +0 -19
- package/blocks/init/src/Blocks/custom/share/share-block.js +0 -13
- package/blocks/init/src/Blocks/custom/share/share.php +0 -11
- package/blocks/init/src/Blocks/custom/site-footer/components/site-footer-editor.js +0 -57
- package/blocks/init/src/Blocks/custom/site-footer/components/site-footer-options.js +0 -106
- package/blocks/init/src/Blocks/custom/site-footer/manifest.json +0 -73
- package/blocks/init/src/Blocks/custom/site-footer/site-footer-block.js +0 -13
- package/blocks/init/src/Blocks/custom/site-footer/site-footer.php +0 -74
- package/blocks/init/src/Blocks/custom/site-navigation/assets/index.js +0 -9
- package/blocks/init/src/Blocks/custom/site-navigation/components/site-navigation-editor.js +0 -42
- package/blocks/init/src/Blocks/custom/site-navigation/components/site-navigation-options.js +0 -73
- package/blocks/init/src/Blocks/custom/site-navigation/manifest.json +0 -77
- package/blocks/init/src/Blocks/custom/site-navigation/site-navigation-block.js +0 -13
- package/blocks/init/src/Blocks/custom/site-navigation/site-navigation.php +0 -99
- package/blocks/init/src/Blocks/custom/table-of-contents/assets/index.js +0 -58
- package/blocks/init/src/Blocks/custom/table-of-contents/components/table-of-contents-editor.js +0 -38
- package/blocks/init/src/Blocks/custom/table-of-contents/components/table-of-contents-options.js +0 -32
- package/blocks/init/src/Blocks/custom/table-of-contents/manifest.json +0 -48
- package/blocks/init/src/Blocks/custom/table-of-contents/table-of-contents-block.js +0 -13
- package/blocks/init/src/Blocks/custom/table-of-contents/table-of-contents.php +0 -31
- package/blocks/init/src/Blocks/custom/video/components/video-editor.js +0 -6
- package/blocks/init/src/Blocks/custom/video/components/video-options.js +0 -12
- package/blocks/init/src/Blocks/custom/video/manifest.json +0 -29
- package/blocks/init/src/Blocks/custom/video/video-block.js +0 -13
- package/blocks/init/src/Blocks/custom/video/video.php +0 -22
- package/blocks/init/src/Blocks/manifest.json +0 -32
- package/blocks/init/src/Blocks/variations/card-simple/manifest.json +0 -17
- package/blocks/init/src/Blocks/wrapper/components/wrapper-editor.js +0 -12
- package/blocks/init/src/Blocks/wrapper/components/wrapper-options.js +0 -364
- package/blocks/init/src/Blocks/wrapper/manifest.json +0 -459
- package/blocks/init/src/Blocks/wrapper/styles-editor.css +0 -13
- package/blocks/init/src/Blocks/wrapper/styles.css +0 -19
- package/blocks/init/src/Blocks/wrapper/wrapper.js +0 -27
- package/blocks/init/src/Blocks/wrapper/wrapper.php +0 -34
- package/bun.lockb +0 -0
- package/readme/packages.md +0 -74
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eightshift/frontend-libs-tailwind",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"description": "A framework for creating modern Gutenberg themes with styling provided by Tailwind CSS.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Eightshift team",
|
|
@@ -27,55 +27,45 @@
|
|
|
27
27
|
},
|
|
28
28
|
"scripts": {
|
|
29
29
|
"lintStyle": "stylelint **/*.css",
|
|
30
|
-
"lintJs": "
|
|
30
|
+
"lintJs": "bunx eslint",
|
|
31
31
|
"lint": "npm run lintJs && npm run lintStyle",
|
|
32
32
|
"prepare": "husky"
|
|
33
33
|
},
|
|
34
34
|
"homepage": "https://github.com/infinum/eightshift-frontend-libs-tailwind#readme",
|
|
35
35
|
"license": "MIT",
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@eightshift/ui-components": "^3.0.
|
|
37
|
+
"@eightshift/ui-components": "^3.0.1",
|
|
38
38
|
"@stylistic/eslint-plugin-js": "^4.2.0",
|
|
39
39
|
"@stylistic/stylelint-plugin": "^3.1.2",
|
|
40
|
-
"@swc/core": "^1.11.
|
|
41
|
-
"@wordpress/
|
|
42
|
-
"@wordpress/block-editor": "^14.14.0",
|
|
43
|
-
"@wordpress/dependency-extraction-webpack-plugin": "^5.9.0",
|
|
44
|
-
"@wordpress/dom-ready": "^4.19.0",
|
|
45
|
-
"@wordpress/server-side-render": "^5.19.0",
|
|
40
|
+
"@swc/core": "^1.11.22",
|
|
41
|
+
"@wordpress/dependency-extraction-webpack-plugin": "^6.22.0",
|
|
46
42
|
"browserslist": "^4.24.4",
|
|
47
43
|
"css-loader": "^7.1.2",
|
|
48
44
|
"css-minimizer-webpack-plugin": "^7.0.2",
|
|
49
|
-
"eslint": "^9.
|
|
50
|
-
"eslint-config-prettier": "^10.1.
|
|
51
|
-
"eslint-plugin-prettier": "^5.2.
|
|
45
|
+
"eslint": "^9.25.1",
|
|
46
|
+
"eslint-config-prettier": "^10.1.2",
|
|
47
|
+
"eslint-plugin-prettier": "^5.2.6",
|
|
52
48
|
"globals": "^16.0.0",
|
|
53
49
|
"husky": "^9.1.7",
|
|
54
|
-
"lightningcss": "^1.29.
|
|
50
|
+
"lightningcss": "^1.29.3",
|
|
55
51
|
"mini-css-extract-plugin": "^2.9.2",
|
|
56
52
|
"postcss": "^8.5.3",
|
|
57
53
|
"postcss-loader": "^8.1.1",
|
|
58
54
|
"prettier": "^3.5.3",
|
|
59
55
|
"prettier-plugin-tailwindcss": "^0.6.11",
|
|
60
|
-
"sonner": "^2.0.
|
|
61
|
-
"stylelint": "^16.
|
|
62
|
-
"stylelint-config-standard": "^
|
|
56
|
+
"sonner": "^2.0.3",
|
|
57
|
+
"stylelint": "^16.19.0",
|
|
58
|
+
"stylelint-config-standard": "^38.0.0",
|
|
63
59
|
"swc-loader": "^0.2.6",
|
|
64
60
|
"terser-webpack-plugin": "^5.3.14",
|
|
65
|
-
"webpack": "^5.
|
|
61
|
+
"webpack": "^5.99.6",
|
|
66
62
|
"webpack-cli": "^6.0.1",
|
|
67
|
-
"webpack-manifest-plugin": "^5.0.
|
|
63
|
+
"webpack-manifest-plugin": "^5.0.1",
|
|
68
64
|
"webpack-merge": "^6.0.1"
|
|
69
65
|
},
|
|
70
66
|
"devDependencies": {
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"lint-staged": "^15.4.3",
|
|
74
|
-
"micromodal": "^0.4.10",
|
|
75
|
-
"ol": "^10.4.0",
|
|
76
|
-
"ol-mapbox-style": "^12.5.0",
|
|
77
|
-
"tailwindcss": "^4.0.12",
|
|
78
|
-
"tailwindcss-animate": "^1.0.7"
|
|
67
|
+
"lint-staged": "^15.5.1",
|
|
68
|
+
"@wordpress/api-fetch": "^7.22.0"
|
|
79
69
|
},
|
|
80
70
|
"sideEffects": false,
|
|
81
71
|
"lint-staged": {
|
|
@@ -64,7 +64,7 @@ export const PickerPlaceholder = (props) => {
|
|
|
64
64
|
<RichLabel
|
|
65
65
|
icon={icon}
|
|
66
66
|
label={title}
|
|
67
|
-
className='col-span-2 mb-2 font-medium !text-gray-400
|
|
67
|
+
className='col-span-2 mb-2 select-none font-medium !text-gray-400'
|
|
68
68
|
/>
|
|
69
69
|
|
|
70
70
|
<span className='es:col-span-2 es:select-none es:justify-self-center'>{presetsHeading}</span>
|
package/scripts/editor/colors.js
CHANGED
|
@@ -16,9 +16,9 @@ import { upperFirst } from '@eightshift/ui-components/utilities';
|
|
|
16
16
|
*/
|
|
17
17
|
export const getPaletteColors = () =>
|
|
18
18
|
useSelect((select) => {
|
|
19
|
-
const colors = select(STORE_NAME).getSettings()
|
|
19
|
+
const colors = select(STORE_NAME).getSettings()?.globalVariables?.colors;
|
|
20
20
|
|
|
21
|
-
return colors
|
|
21
|
+
return colors?.reduce(
|
|
22
22
|
(obj, item) => ({
|
|
23
23
|
...obj,
|
|
24
24
|
[item.slug]: item,
|
|
@@ -31,7 +31,7 @@ import { camelCase, kebabCase, lowerFirst, upperFirst } from '@eightshift/ui-com
|
|
|
31
31
|
* Usage:
|
|
32
32
|
* ```js
|
|
33
33
|
* registerBlocks(
|
|
34
|
-
*
|
|
34
|
+
* globalManifest,
|
|
35
35
|
* Wrapper,
|
|
36
36
|
* WrapperManifest,
|
|
37
37
|
* require.context('./../../components', true, /manifest.json$/),
|
|
@@ -49,9 +49,9 @@ export const registerBlocks = (
|
|
|
49
49
|
globalManifest = {},
|
|
50
50
|
wrapperComponent = null,
|
|
51
51
|
wrapperManifest = {},
|
|
52
|
-
componentsManifestPath,
|
|
53
|
-
blocksManifestPath,
|
|
54
|
-
blocksEditComponentPath,
|
|
52
|
+
componentsManifestPath = null,
|
|
53
|
+
blocksManifestPath = null,
|
|
54
|
+
blocksEditComponentPath = null,
|
|
55
55
|
hooksComponentPath = null,
|
|
56
56
|
transformsComponentPath = null,
|
|
57
57
|
deprecationsComponentPath = null,
|
|
@@ -226,9 +226,6 @@ export const registerVariations = (
|
|
|
226
226
|
) => {
|
|
227
227
|
const variationsManifests = variationsManifestPath.keys().map(variationsManifestPath);
|
|
228
228
|
|
|
229
|
-
// Set all store values.
|
|
230
|
-
dispatch(STORE_NAME).setVariations(variationsManifests);
|
|
231
|
-
|
|
232
229
|
// Iterate blocks to register.
|
|
233
230
|
variationsManifests.map((variationManifest) => {
|
|
234
231
|
const { active = true } = variationManifest;
|
package/scripts/editor/store.js
CHANGED
|
@@ -10,6 +10,7 @@ const DEFAULT_STATE = {
|
|
|
10
10
|
components: {},
|
|
11
11
|
config: {
|
|
12
12
|
useWrapper: true,
|
|
13
|
+
useLegacyComponents: true,
|
|
13
14
|
},
|
|
14
15
|
wrapper: {},
|
|
15
16
|
variations: {},
|
|
@@ -44,6 +45,9 @@ const selectors = {
|
|
|
44
45
|
getConfigUseWrapper(state) {
|
|
45
46
|
return state.config.useWrapper;
|
|
46
47
|
},
|
|
48
|
+
getConfigUseLegacyComponents(state) {
|
|
49
|
+
return state.config.useLegacyComponents;
|
|
50
|
+
},
|
|
47
51
|
getWrapper(state) {
|
|
48
52
|
return state.wrapper;
|
|
49
53
|
},
|
|
@@ -90,6 +94,12 @@ const actions = {
|
|
|
90
94
|
config,
|
|
91
95
|
};
|
|
92
96
|
},
|
|
97
|
+
setConfigUseLegacyComponents(config) {
|
|
98
|
+
return {
|
|
99
|
+
type: 'SET_CONFIG_USE_LEGACY_COMPONENTS',
|
|
100
|
+
config,
|
|
101
|
+
};
|
|
102
|
+
},
|
|
93
103
|
setWrapper(wrapper) {
|
|
94
104
|
return {
|
|
95
105
|
type: 'SET_WRAPPER',
|
|
@@ -140,6 +150,15 @@ const reducer = (state = DEFAULT_STATE, action) => {
|
|
|
140
150
|
},
|
|
141
151
|
};
|
|
142
152
|
}
|
|
153
|
+
case 'SET_CONFIG_USE_LEGACY_COMPONENTS': {
|
|
154
|
+
return {
|
|
155
|
+
...state,
|
|
156
|
+
config: {
|
|
157
|
+
...state.config,
|
|
158
|
+
useLegacyComponents: action.config,
|
|
159
|
+
},
|
|
160
|
+
};
|
|
161
|
+
}
|
|
143
162
|
case 'SET_WRAPPER': {
|
|
144
163
|
return {
|
|
145
164
|
...state,
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
* Helper to set and unset cookies.
|
|
3
3
|
*/
|
|
4
4
|
export const cookies = {
|
|
5
|
-
|
|
6
5
|
/**
|
|
7
6
|
* Set a cookie value
|
|
8
7
|
*
|
|
@@ -10,32 +9,41 @@ export const cookies = {
|
|
|
10
9
|
* @param {string} value - Cookie value.
|
|
11
10
|
* @param {number} time - Number denoting the expiration of the cookie.
|
|
12
11
|
* @param {string} path - URL path that must exist in the requested URL in order to send the Cookie header.
|
|
13
|
-
* @param {string
|
|
12
|
+
* @param {string} domain - Domain name of the server that set the cookie.
|
|
13
|
+
* @param {boolean} secure - A secure cookie is only sent to the server with an encrypted request over the HTTPS protocol.
|
|
14
|
+
* @param {string} sameSite - A SameSite cookie prevents the browser from sending this cookie along with cross-site requests
|
|
15
|
+
*
|
|
14
16
|
* @access public
|
|
15
17
|
*
|
|
16
|
-
* @returns {
|
|
18
|
+
* @returns {boolean}
|
|
17
19
|
*
|
|
18
20
|
* Usage:
|
|
19
21
|
* ```js
|
|
20
|
-
* cookies.setCookie('gdpr', '2', cookies.setOneDay(), '/');
|
|
22
|
+
* cookies.setCookie('gdpr', '2', cookies.setOneDay(), '/', '.example.com', true, 'Strict');
|
|
21
23
|
* ```
|
|
22
24
|
*/
|
|
23
|
-
setCookie(key, value, time, path, domain) {
|
|
25
|
+
setCookie(key, value, time, path, domain, secure = true, sameSite = 'Lax') {
|
|
24
26
|
const expires = new Date();
|
|
25
|
-
expires.setTime(expires.getTime() +
|
|
26
|
-
|
|
27
|
-
let pathValue = '';
|
|
28
|
-
let domainValue = '';
|
|
27
|
+
expires.setTime(expires.getTime() + time);
|
|
29
28
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
const cookieParts = {
|
|
30
|
+
value: `${key}=${value}`,
|
|
31
|
+
expires: `expires=${expires.toUTCString()}`,
|
|
32
|
+
sameSite: `SameSite=${sameSite}`,
|
|
33
|
+
path: path ? `path=${path}` : '',
|
|
34
|
+
domain: domain ? `domain=${domain}` : '',
|
|
35
|
+
secure: secure ? 'Secure' : '',
|
|
36
|
+
};
|
|
33
37
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
38
|
+
try {
|
|
39
|
+
document.cookie = Object.values(cookieParts).filter(Boolean).join('; ');
|
|
40
|
+
|
|
41
|
+
return true;
|
|
42
|
+
} catch (e) {
|
|
43
|
+
console.error('Failed to set cookie:', e);
|
|
37
44
|
|
|
38
|
-
|
|
45
|
+
return false;
|
|
46
|
+
}
|
|
39
47
|
},
|
|
40
48
|
|
|
41
49
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import domReady from '@wordpress/dom-ready';
|
|
2
2
|
import apiFetch from '@wordpress/api-fetch';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { addAction } from '@wordpress/hooks';
|
|
4
|
+
import { select } from '@wordpress/data';
|
|
5
5
|
|
|
6
6
|
/* global YoastSEO */
|
|
7
7
|
|
|
@@ -9,61 +9,87 @@ import { debounce, isEmpty } from '@eightshift/ui-components/utilities';
|
|
|
9
9
|
* Attributes with this key will be passed as custom data to YoastSEO's analysis.
|
|
10
10
|
* See https://developer.yoast.com/customization/yoast-seo/adding-custom-data-analysis for more info.
|
|
11
11
|
*/
|
|
12
|
-
export const yoastSeo = () => {
|
|
12
|
+
export const yoastSeo = (options) => {
|
|
13
|
+
const filterPriority = options?.filterPriority || 20;
|
|
14
|
+
const filterName = options?.filterName || 'EightshiftCustomSeo';
|
|
15
|
+
|
|
13
16
|
domReady(() => {
|
|
14
|
-
//
|
|
15
|
-
if (
|
|
17
|
+
// Ensure YoastSEO.js is present and can access the necessary features.
|
|
18
|
+
if (
|
|
19
|
+
typeof YoastSEO === 'undefined' ||
|
|
20
|
+
typeof YoastSEO.analysis === 'undefined' ||
|
|
21
|
+
typeof YoastSEO.analysis.worker === 'undefined'
|
|
22
|
+
) {
|
|
16
23
|
return;
|
|
17
24
|
}
|
|
18
25
|
|
|
19
|
-
//
|
|
20
|
-
let
|
|
21
|
-
let
|
|
26
|
+
// Initialize the state and dirty flag.
|
|
27
|
+
let state = '';
|
|
28
|
+
let isDirty = true;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* This function fetches the content of the post from the API.
|
|
32
|
+
* It will only fetch the content data and will not refresh the content.
|
|
33
|
+
*
|
|
34
|
+
* @param {boolean} shouldReload Should the content be refreshed after fetching.
|
|
35
|
+
*/
|
|
36
|
+
const fetchContent = async (shouldReload = true) => {
|
|
37
|
+
// Set the dirty flag to false.
|
|
38
|
+
isDirty = false;
|
|
39
|
+
|
|
40
|
+
// Find API url for single item.
|
|
41
|
+
const apiUrl = select('core/editor')?.getCurrentPost()?.['_links']?.['wp:action-publish']?.[0]?.href;
|
|
22
42
|
|
|
23
|
-
|
|
24
|
-
|
|
43
|
+
if (typeof apiUrl === 'undefined') {
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
25
46
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
const isSavingPost = wp.data.select('core/editor').isSavingPost();
|
|
32
|
-
const isAutosavingPost = wp.data.select('core/editor').isAutosavingPost();
|
|
47
|
+
// Fetch content from the api with only content data in it.
|
|
48
|
+
const response = await apiFetch({
|
|
49
|
+
url: `${apiUrl}?_fields=content`,
|
|
50
|
+
method: 'GET',
|
|
51
|
+
});
|
|
33
52
|
|
|
34
|
-
|
|
35
|
-
|
|
53
|
+
// Set the content to the state.
|
|
54
|
+
state = response?.content?.rendered || '';
|
|
36
55
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
56
|
+
// Refresh the content if needed.
|
|
57
|
+
if (shouldReload) {
|
|
58
|
+
YoastSEO.app.refresh();
|
|
59
|
+
}
|
|
60
|
+
};
|
|
41
61
|
|
|
42
|
-
|
|
62
|
+
/**
|
|
63
|
+
* This function is called by the editor to save the content of the post.
|
|
64
|
+
* It will refresh the content after the save is done.
|
|
65
|
+
*
|
|
66
|
+
* @param {string} edits The content of the post.
|
|
67
|
+
*
|
|
68
|
+
* @return {string} The content of the post.
|
|
69
|
+
*/
|
|
70
|
+
const onSaveCallback = (edits) => {
|
|
71
|
+
fetchContent();
|
|
43
72
|
|
|
44
|
-
|
|
45
|
-
|
|
73
|
+
return edits;
|
|
74
|
+
};
|
|
46
75
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
76
|
+
/**
|
|
77
|
+
* This function is called by YoastSEO to get the content of the post.
|
|
78
|
+
*
|
|
79
|
+
* @return {string} The content of the post.
|
|
80
|
+
*/
|
|
81
|
+
const registerYoastSeoPlugin = () => {
|
|
82
|
+
// Set the dirty flag to true.
|
|
83
|
+
if (isDirty) {
|
|
84
|
+
fetchContent(false);
|
|
85
|
+
}
|
|
50
86
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
url: `${apiUrl}?_fields=content`,
|
|
54
|
-
method: 'GET',
|
|
55
|
-
}).then((response) => {
|
|
56
|
-
const fetchedContent = response?.content?.rendered;
|
|
87
|
+
return state;
|
|
88
|
+
};
|
|
57
89
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
content = fetchedContent;
|
|
63
|
-
// Refreshing Yoast input.
|
|
64
|
-
YoastSEO.app.pluggable.refresh();
|
|
65
|
-
});
|
|
66
|
-
}, 50),
|
|
67
|
-
);
|
|
90
|
+
// Register the filter and the plugin.
|
|
91
|
+
addAction('editor.savePost', filterName, onSaveCallback);
|
|
92
|
+
YoastSEO.app.registerPlugin(filterName, { status: 'ready' });
|
|
93
|
+
YoastSEO.app.registerModification('content', registerYoastSeoPlugin, filterName, filterPriority);
|
|
68
94
|
});
|
|
69
95
|
};
|
package/webpack/base.mjs
CHANGED
package/webpack/helpers.mjs
CHANGED
|
@@ -10,7 +10,6 @@ import path from 'path';
|
|
|
10
10
|
*
|
|
11
11
|
* @param {string} projectDir Current project directory absolute path.
|
|
12
12
|
* @param {string} projectPathConfig Project path relative to project root.
|
|
13
|
-
* @param {string} assetsPathConfig Assets path after projectPath location.
|
|
14
13
|
* @param {string} blocksAssetsPathConfig Path of the block assets.
|
|
15
14
|
* @param {string} outputPathConfig Public output path after projectPath location.
|
|
16
15
|
* @param {string} blocksManifestSettingsPath Main global settings manifest.json path after projectPath location.
|
|
@@ -19,7 +18,6 @@ import path from 'path';
|
|
|
19
18
|
function getConfig(
|
|
20
19
|
projectDir,
|
|
21
20
|
projectPathConfig,
|
|
22
|
-
assetsPathConfig = 'assets',
|
|
23
21
|
blocksAssetsPathConfig = 'src/Blocks/assets',
|
|
24
22
|
outputPathConfig = 'public',
|
|
25
23
|
blocksManifestSettingsPath = 'src/Blocks/manifest.json',
|
|
@@ -38,7 +36,6 @@ function getConfig(
|
|
|
38
36
|
|
|
39
37
|
// Clear all slashes from user config.
|
|
40
38
|
const projectPathConfigClean = projectPathConfig.replace(/^\/|\/$/g, '');
|
|
41
|
-
const assetsPathConfigClean = assetsPathConfig.replace(/^\/|\/$/g, '');
|
|
42
39
|
const blocksAssetsPathConfigClean = blocksAssetsPathConfig.replace(/^\/|\/$/g, '');
|
|
43
40
|
const outputPathConfigClean = outputPathConfig.replace(/^\/|\/$/g, '');
|
|
44
41
|
const blocksManifestSettingsPathClean = blocksManifestSettingsPath.replace(/^\/|\/$/g, '');
|
|
@@ -56,8 +53,7 @@ function getConfig(
|
|
|
56
53
|
publicPath: path.join('/', projectPathConfigClean, outputPathConfigClean, '/'),
|
|
57
54
|
|
|
58
55
|
// Source files entries absolute locations.
|
|
59
|
-
|
|
60
|
-
applicationAdminEntry: path.resolve(absolutePath, assetsPathConfigClean, 'application-admin.js'),
|
|
56
|
+
applicationAdminEntry: path.resolve(absolutePath, blocksAssetsPathConfigClean, 'application-admin.js'),
|
|
61
57
|
applicationBlocksEntry: path.resolve(absolutePath, blocksAssetsPathConfigClean, 'application-blocks.js'),
|
|
62
58
|
applicationBlocksEditorEntry: path.resolve(
|
|
63
59
|
absolutePath,
|
package/webpack/index.mjs
CHANGED
|
@@ -21,7 +21,6 @@ const eightshiftConfig = (mode, optionsData = {}) => {
|
|
|
21
21
|
options.config = getConfig(
|
|
22
22
|
optionsData.config.projectDir,
|
|
23
23
|
optionsData.config.projectPath,
|
|
24
|
-
optionsData.config.assetsPath,
|
|
25
24
|
optionsData.config.blocksAssetsPath,
|
|
26
25
|
optionsData.config.outputPath,
|
|
27
26
|
optionsData.config.blocksManifestSettingsPath,
|
package/webpack/project.mjs
CHANGED
|
@@ -18,11 +18,6 @@ export default (options) => {
|
|
|
18
18
|
library: '[name]',
|
|
19
19
|
};
|
|
20
20
|
|
|
21
|
-
// Load Application Entrypoint.
|
|
22
|
-
if (!options.overrides.includes('application') && fs.existsSync(options.config.applicationEntry)) {
|
|
23
|
-
entry.application = options.config.applicationEntry;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
21
|
// Load ApplicationAdmin Entrypoint.
|
|
27
22
|
if (!options.overrides.includes('applicationAdmin') && fs.existsSync(options.config.applicationAdminEntry)) {
|
|
28
23
|
entry.applicationAdmin = options.config.applicationAdminEntry;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Main entry point for styles, scripts, and other assets used in the site frontend.
|
|
3
|
-
* Don't load Block editor-related assets here!
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
// Styles.
|
|
7
|
-
import './styles/application.css';
|
|
8
|
-
|
|
9
|
-
// Scripts.
|
|
10
|
-
import './scripts/application';
|
|
11
|
-
|
|
12
|
-
// Images.
|
|
13
|
-
import './images';
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Theme color definitions, used in the Tailwind configuration file and during registration.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import colors from 'tailwindcss/colors';
|
|
6
|
-
|
|
7
|
-
export const themeColors = {
|
|
8
|
-
transparent: 'transparent',
|
|
9
|
-
current: 'currentColor',
|
|
10
|
-
black: colors.black,
|
|
11
|
-
white: colors.white,
|
|
12
|
-
gray: colors.stone,
|
|
13
|
-
navy: {
|
|
14
|
-
50: '#eef8ff',
|
|
15
|
-
100: '#dcf0ff',
|
|
16
|
-
200: '#b2e3ff',
|
|
17
|
-
300: '#6dceff',
|
|
18
|
-
400: '#20b5ff',
|
|
19
|
-
500: '#009cff',
|
|
20
|
-
600: '#007bdf',
|
|
21
|
-
700: '#0061b4',
|
|
22
|
-
800: '#005395',
|
|
23
|
-
900: '#00447a',
|
|
24
|
-
950: '#002c54',
|
|
25
|
-
},
|
|
26
|
-
red: {
|
|
27
|
-
50: '#fff0f2',
|
|
28
|
-
100: '#ffdde1',
|
|
29
|
-
200: '#ffc1c9',
|
|
30
|
-
300: '#ff95a3',
|
|
31
|
-
400: '#ff596f',
|
|
32
|
-
500: '#ff2643',
|
|
33
|
-
600: '#fc0626',
|
|
34
|
-
700: '#c5001a',
|
|
35
|
-
800: '#af051b',
|
|
36
|
-
900: '#900c1d',
|
|
37
|
-
950: '#50000b',
|
|
38
|
-
},
|
|
39
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This is the main entry point for Block Editor blocks used for the `WordPress admin editor`.
|
|
3
|
-
* This file registers styles and scripts.
|
|
4
|
-
*
|
|
5
|
-
* Usage: `WordPress admin editor`.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
// Styles.
|
|
9
|
-
import './styles/tailwind.css';
|
|
10
|
-
import './styles/application-blocks-editor.css';
|
|
11
|
-
import './styles/editor/editor-overrides.css';
|
|
12
|
-
|
|
13
|
-
// Scripts.
|
|
14
|
-
import './scripts/application-blocks-editor';
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This is the main entry point for Block Editor blocks used for the `WordPress frontend screen`.
|
|
3
|
-
* This file registers styles and scripts.
|
|
4
|
-
*
|
|
5
|
-
* Usage: `WordPress frontend screen`.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
// Styles.
|
|
9
|
-
import './styles/tailwind.css';
|
|
10
|
-
import './styles/application-blocks-frontend.css';
|
|
11
|
-
|
|
12
|
-
// Scripts.
|
|
13
|
-
import './scripts/application-blocks-frontend';
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This is the main entry point for Block Editor blocks used for the `WordPress frontend screen` and `WordPress admin editor`.
|
|
3
|
-
* This file registers styles and scripts.
|
|
4
|
-
*
|
|
5
|
-
* Usage: `WordPress frontend screen` and `WordPress admin editor`.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
// Styles.
|
|
9
|
-
import './styles/application-blocks.css';
|