@eightshift/frontend-libs-tailwind 1.4.1 → 1.4.3
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/.husky/pre-commit +0 -0
- package/CHANGELOG.md +100 -33
- package/blocks/init/src/Blocks/custom/column/manifest.json +1 -1
- package/bun.lockb +0 -0
- package/package.json +91 -91
- package/scripts/editor/tailwindcss.js +4 -4
- package/scripts/plugins/yoast-seo.js +1 -1
- package/webpack/base.mjs +9 -23
package/.husky/pre-commit
CHANGED
|
File without changes
|
package/CHANGELOG.md
CHANGED
|
@@ -1,68 +1,135 @@
|
|
|
1
|
-
|
|
2
1
|
# Change Log for the Eightshift Frontend Libs Tailwind
|
|
2
|
+
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
5
|
This projects adheres to [Semantic Versioning](https://semver.org/) and [Keep a CHANGELOG](https://keepachangelog.com/).
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## [1.4.3]
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
|
|
13
|
+
- Fixing Yoast SEO plugin helpers.
|
|
14
|
+
|
|
15
|
+
## [1.4.2]
|
|
16
|
+
|
|
17
|
+
### Fixed
|
|
9
18
|
|
|
10
|
-
|
|
11
|
-
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
19
|
+
- Fixed bug with `combinations` output in `tailwindClasses` helper.
|
|
20
|
+
- Fixed CSS `url()` imports for images not working due to Webpack config.
|
|
21
|
+
|
|
22
|
+
## [1.4.1]
|
|
23
|
+
|
|
24
|
+
### Changed
|
|
25
|
+
|
|
26
|
+
- `tailwindClasses` check will now work even if no `parts` are defined.
|
|
27
|
+
|
|
28
|
+
## [1.4.0]
|
|
29
|
+
|
|
30
|
+
### Added
|
|
31
|
+
|
|
32
|
+
- Introduced new, more flexible `tailwindClasses` function.
|
|
33
|
+
- Added basic warnings for misconfigurations of parts and options.
|
|
16
34
|
- Updated block and component schemas with new Tailwind functionalities.
|
|
17
|
-
- Updated dependencies.
|
|
18
35
|
- Updated default blocks with new Tailwind functions.
|
|
36
|
+
|
|
37
|
+
### Changed
|
|
38
|
+
|
|
39
|
+
- **Potentially breaking**: `twClassesEditor` is now appended to `twClasses`. Use `twClassesEditorOnly` for editor-only classes.
|
|
40
|
+
- **Potentially breaking**: The `parts` key in manifest now supports specifying multiple parts using a comma-separated string.
|
|
41
|
+
- Classes can now be applied to multiple parts in one option or combination, including responsive options.
|
|
19
42
|
- Default Stylelint config will no longer report `@tailwind` rules.
|
|
43
|
+
- Updated dependencies.
|
|
44
|
+
|
|
45
|
+
## [1.3.3]
|
|
46
|
+
|
|
47
|
+
### Changed
|
|
20
48
|
|
|
21
|
-
## [1.3.3] - 2024-09-24
|
|
22
49
|
- Updating schema.
|
|
23
50
|
|
|
24
|
-
## [1.3.2]
|
|
51
|
+
## [1.3.2]
|
|
52
|
+
|
|
53
|
+
### Fixed
|
|
54
|
+
|
|
25
55
|
- Fixing theme options to use stringified JSON instead of an object.
|
|
26
56
|
|
|
27
|
-
## [1.3.1]
|
|
28
|
-
|
|
57
|
+
## [1.3.1]
|
|
58
|
+
|
|
59
|
+
### Added
|
|
60
|
+
|
|
61
|
+
- Helper `getFilteredAttributes` for SSR components to filter unwanted attributes and optimize output.
|
|
62
|
+
|
|
63
|
+
## [1.3.0]
|
|
64
|
+
|
|
65
|
+
### Added
|
|
66
|
+
|
|
67
|
+
- `twClasses` and `twClassesEditor` can now be passed as arrays.
|
|
68
|
+
|
|
69
|
+
### Changed
|
|
29
70
|
|
|
30
|
-
|
|
31
|
-
-
|
|
32
|
-
- Updated schemas to account for the `twClasses`/`twClassesEditor` changes.
|
|
33
|
-
- Tailwind output functions will now output the custom classes if no Tailwind classes are in the output.
|
|
71
|
+
- Updated schemas to support the changes in `twClasses`/`twClassesEditor`.
|
|
72
|
+
- Tailwind output functions now output custom classes if no Tailwind classes are detected.
|
|
34
73
|
- Tweaked Prettier config.
|
|
35
74
|
- Updated dependencies.
|
|
36
75
|
|
|
37
|
-
## [1.2.0]
|
|
76
|
+
## [1.2.0]
|
|
77
|
+
|
|
78
|
+
### Fixed
|
|
79
|
+
|
|
38
80
|
- Fixed default `perPage` param in `wpSearchRoute`.
|
|
39
|
-
-
|
|
40
|
-
|
|
81
|
+
- Fixed bugs in built-in blocks.
|
|
82
|
+
|
|
83
|
+
### Added
|
|
84
|
+
|
|
85
|
+
- Added support for `hidden` prop and accepted types passthrough for image and file pickers.
|
|
86
|
+
|
|
87
|
+
### Changed
|
|
88
|
+
|
|
41
89
|
- Updated dependencies.
|
|
42
90
|
|
|
43
|
-
## [1.1.1]
|
|
91
|
+
## [1.1.1]
|
|
92
|
+
|
|
93
|
+
### Fixed
|
|
94
|
+
|
|
44
95
|
- Fixed default global manifest.
|
|
96
|
+
|
|
97
|
+
### Removed
|
|
98
|
+
|
|
45
99
|
- Removed erroneous styles.
|
|
46
100
|
|
|
47
|
-
## [1.1.0]
|
|
101
|
+
## [1.1.0]
|
|
102
|
+
|
|
103
|
+
### Added
|
|
104
|
+
|
|
105
|
+
- Added new options to the fetch script: `truncateTitle` and `labelProp`.
|
|
106
|
+
- Added `hidden` prop to `BlockInserter`.
|
|
107
|
+
- Added `PickerPlaceholder` component.
|
|
108
|
+
- Added dynamic parts option and `getTwDynamicPart` helper.
|
|
109
|
+
|
|
110
|
+
### Changed
|
|
111
|
+
|
|
48
112
|
- Updated dependencies.
|
|
49
113
|
- Tweaked fetch script to use WP `apiFetch`.
|
|
50
|
-
-
|
|
51
|
-
- Removed `urlBase` option from fetch script, as it's no longer needed.
|
|
52
|
-
- Updated some built-in blocks
|
|
53
|
-
- Moved fonts from Google Fonts to built-in.
|
|
54
|
-
- Removed `.gitignore` ESLint ignore.
|
|
114
|
+
- Updated some built-in blocks.
|
|
55
115
|
- Tweaked ESLint config.
|
|
56
116
|
- Updated base blocks.
|
|
57
|
-
- Added `hidden` prop to `BlockInserter`.
|
|
58
|
-
- Added `PickerPlaceholder` component.
|
|
59
|
-
- Added option for dynamic parts and the `getTwDynamicPart` helper.
|
|
60
117
|
|
|
61
|
-
|
|
118
|
+
### Removed
|
|
119
|
+
|
|
120
|
+
- Removed `urlBase` option from fetch script.
|
|
121
|
+
- Moved fonts from Google Fonts to built-in.
|
|
122
|
+
- Removed `.gitignore` ESLint ignore.
|
|
123
|
+
|
|
124
|
+
## [1.0.0]
|
|
125
|
+
|
|
126
|
+
### Added
|
|
127
|
+
|
|
62
128
|
- Initial release.
|
|
63
129
|
|
|
64
130
|
[Unreleased]: https://github.com/infinum/eightshift-frontend-libs-tailwind/compare/master...HEAD
|
|
65
|
-
|
|
131
|
+
[1.4.3]: https://github.com/infinum/eightshift-frontend-libs-tailwind/compare/1.4.2...1.4.3
|
|
132
|
+
[1.4.2]: https://github.com/infinum/eightshift-frontend-libs-tailwind/compare/1.4.1...1.4.2
|
|
66
133
|
[1.4.1]: https://github.com/infinum/eightshift-frontend-libs-tailwind/compare/1.4.0...1.4.1
|
|
67
134
|
[1.4.0]: https://github.com/infinum/eightshift-frontend-libs-tailwind/compare/1.3.3...1.4.0
|
|
68
135
|
[1.3.3]: https://github.com/infinum/eightshift-frontend-libs-tailwind/compare/1.3.2...1.3.3
|
package/bun.lockb
ADDED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,92 +1,92 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
}
|
|
2
|
+
"name": "@eightshift/frontend-libs-tailwind",
|
|
3
|
+
"version": "1.4.3",
|
|
4
|
+
"description": "A framework for creating modern Gutenberg themes with styling provided by Tailwind CSS.",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "Eightshift team",
|
|
7
|
+
"email": "team@eightshift.com",
|
|
8
|
+
"url": "https://eightshift.com/"
|
|
9
|
+
},
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "git+https://github.com/infinum/eightshift-frontend-libs-tailwind.git"
|
|
13
|
+
},
|
|
14
|
+
"keywords": [
|
|
15
|
+
"frontend",
|
|
16
|
+
"css",
|
|
17
|
+
"mixin",
|
|
18
|
+
"js",
|
|
19
|
+
"utility",
|
|
20
|
+
"module",
|
|
21
|
+
"WordPress",
|
|
22
|
+
"tailwind",
|
|
23
|
+
"TailwindCSS"
|
|
24
|
+
],
|
|
25
|
+
"bugs": {
|
|
26
|
+
"url": "https://github.com/infinum/eightshift-frontend-libs-tailwind/issues"
|
|
27
|
+
},
|
|
28
|
+
"scripts": {
|
|
29
|
+
"lintStyle": "stylelint **/*.css",
|
|
30
|
+
"lintJs": "npx eslint",
|
|
31
|
+
"lint": "npm run lintJs && npm run lintStyle",
|
|
32
|
+
"prepare": "husky"
|
|
33
|
+
},
|
|
34
|
+
"homepage": "https://github.com/infinum/eightshift-frontend-libs-tailwind#readme",
|
|
35
|
+
"license": "MIT",
|
|
36
|
+
"dependencies": {
|
|
37
|
+
"@eightshift/ui-components": "^1.6.1",
|
|
38
|
+
"@stylistic/eslint-plugin-js": "^2.8.0",
|
|
39
|
+
"@stylistic/stylelint-plugin": "^3.1.0",
|
|
40
|
+
"@swc/core": "^1.7.26",
|
|
41
|
+
"@wordpress/api-fetch": "^7.8.0",
|
|
42
|
+
"@wordpress/block-editor": "^14.3.0",
|
|
43
|
+
"@wordpress/dependency-extraction-webpack-plugin": "^5.9.0",
|
|
44
|
+
"@wordpress/dom-ready": "^4.8.0",
|
|
45
|
+
"@wordpress/server-side-render": "^5.8.0",
|
|
46
|
+
"browserslist": "^4.24.0",
|
|
47
|
+
"css-loader": "^7.1.2",
|
|
48
|
+
"css-minimizer-webpack-plugin": "^7.0.0",
|
|
49
|
+
"eslint": "^9.11.1",
|
|
50
|
+
"eslint-config-prettier": "^9.1.0",
|
|
51
|
+
"eslint-plugin-prettier": "^5.2.1",
|
|
52
|
+
"globals": "^15.9.0",
|
|
53
|
+
"husky": "^9.1.6",
|
|
54
|
+
"lightningcss": "^1.27.0",
|
|
55
|
+
"mini-css-extract-plugin": "^2.9.1",
|
|
56
|
+
"postcss": "^8.4.47",
|
|
57
|
+
"postcss-loader": "^8.1.1",
|
|
58
|
+
"prettier": "^3.3.3",
|
|
59
|
+
"prettier-plugin-tailwindcss": "^0.6.8",
|
|
60
|
+
"sonner": "^1.5.0",
|
|
61
|
+
"stylelint": "^16.9.0",
|
|
62
|
+
"stylelint-config-standard": "^36.0.1",
|
|
63
|
+
"swc-loader": "^0.2.6",
|
|
64
|
+
"terser-webpack-plugin": "^5.3.10",
|
|
65
|
+
"webpack": "^5.95.0",
|
|
66
|
+
"webpack-cli": "^5.1.4",
|
|
67
|
+
"webpack-manifest-plugin": "^5.0.0",
|
|
68
|
+
"webpack-merge": "^6.0.1"
|
|
69
|
+
},
|
|
70
|
+
"devDependencies": {
|
|
71
|
+
"embla-carousel": "^8.3.0",
|
|
72
|
+
"fluid-tailwind": "^1.0.3",
|
|
73
|
+
"lint-staged": "^15.2.10",
|
|
74
|
+
"micromodal": "^0.4.10",
|
|
75
|
+
"ol": "^10.2.1",
|
|
76
|
+
"ol-mapbox-style": "^12.3.5",
|
|
77
|
+
"tailwindcss": "^3.4.13",
|
|
78
|
+
"tailwindcss-animate": "^1.0.7"
|
|
79
|
+
},
|
|
80
|
+
"sideEffects": false,
|
|
81
|
+
"lint-staged": {
|
|
82
|
+
"*.css": [
|
|
83
|
+
"npm run lintStyle"
|
|
84
|
+
],
|
|
85
|
+
"*.js": [
|
|
86
|
+
"npm run lintJs"
|
|
87
|
+
],
|
|
88
|
+
"*.php": [
|
|
89
|
+
"composer test"
|
|
90
|
+
]
|
|
91
|
+
}
|
|
92
|
+
}
|
|
@@ -435,12 +435,12 @@ const processCombination = (partName, combo, attributes, manifest) => {
|
|
|
435
435
|
for (const [attributeName, allowedValue] of Object.entries(combo?.attributes ?? {})) {
|
|
436
436
|
const optionValue = checkAttr(attributeName, attributes, manifest, true);
|
|
437
437
|
|
|
438
|
-
|
|
438
|
+
const isArrayCondition = Array.isArray(allowedValue);
|
|
439
|
+
|
|
440
|
+
if (isArrayCondition && !allowedValue.includes(optionValue)) {
|
|
439
441
|
matches = false;
|
|
440
442
|
break;
|
|
441
|
-
}
|
|
442
|
-
|
|
443
|
-
if (optionValue !== allowedValue) {
|
|
443
|
+
} else if (!isArrayCondition && optionValue !== allowedValue) {
|
|
444
444
|
matches = false;
|
|
445
445
|
break;
|
|
446
446
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import domReady from '@wordpress/dom-ready';
|
|
2
2
|
import apiFetch from '@wordpress/api-fetch';
|
|
3
3
|
import { subscribe, select } from '@wordpress/data';
|
|
4
|
-
import { debounce, isEmpty } from '
|
|
4
|
+
import { debounce, isEmpty } from '@eightshift/ui-components/utilities';
|
|
5
5
|
|
|
6
6
|
/* global YoastSEO */
|
|
7
7
|
|
package/webpack/base.mjs
CHANGED
|
@@ -78,29 +78,6 @@ export default (options) => {
|
|
|
78
78
|
});
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
-
// Module for Images.
|
|
82
|
-
if (!options.overrides.includes('images')) {
|
|
83
|
-
module.rules.push({
|
|
84
|
-
test: /\.(png|svg|jpg|jpeg|gif|ico|webp)$/i,
|
|
85
|
-
use: [
|
|
86
|
-
{
|
|
87
|
-
loader: 'url-loader',
|
|
88
|
-
options: {
|
|
89
|
-
limit: 8192,
|
|
90
|
-
},
|
|
91
|
-
},
|
|
92
|
-
],
|
|
93
|
-
type: 'javascript/auto',
|
|
94
|
-
});
|
|
95
|
-
|
|
96
|
-
module.rules.push({
|
|
97
|
-
test: /\.(png|svg|jpg|jpeg|gif|ico|webp)$/i,
|
|
98
|
-
exclude: [/fonts/, /node_modules/],
|
|
99
|
-
use: 'file-loader?name=[name].[ext]',
|
|
100
|
-
dependency: { not: ['url'] },
|
|
101
|
-
});
|
|
102
|
-
}
|
|
103
|
-
|
|
104
81
|
// Module for CSS.
|
|
105
82
|
if (!options.overrides.includes('css')) {
|
|
106
83
|
module.rules.push({
|
|
@@ -128,6 +105,15 @@ export default (options) => {
|
|
|
128
105
|
});
|
|
129
106
|
}
|
|
130
107
|
|
|
108
|
+
// Module for Images.
|
|
109
|
+
if (!options.overrides.includes('images')) {
|
|
110
|
+
module.rules.push({
|
|
111
|
+
test: /\.(png|svg|jpg|jpeg|gif|ico|webp)$/i,
|
|
112
|
+
exclude: [/fonts/, /node_modules/],
|
|
113
|
+
type: 'asset/resource',
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
|
|
131
117
|
const resolve = {
|
|
132
118
|
symlinks: false,
|
|
133
119
|
};
|