@eightshift/frontend-libs-tailwind 1.3.1 → 1.3.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/CHANGELOG.md CHANGED
@@ -4,6 +4,12 @@ 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
+ ## [1.3.3] - 2024-09-24
8
+ - Updating schema.
9
+
10
+ ## [1.3.2] - 2024-09-19
11
+ - Fixing theme options to use stringified JSON instead of an object.
12
+
7
13
  ## [1.3.1] - 2024-09-13
8
14
  - Helper `getFilteredAttributes` used on SSR components to filter out unwanted attributes and optimize the output.
9
15
 
@@ -43,6 +49,8 @@ This projects adheres to [Semantic Versioning](https://semver.org/) and [Keep a
43
49
 
44
50
  [Unreleased]: https://github.com/infinum/eightshift-frontend-libs-tailwind/compare/master...HEAD
45
51
 
52
+ [1.3.3]: https://github.com/infinum/eightshift-frontend-libs-tailwind/compare/1.3.2...1.3.3
53
+ [1.3.2]: https://github.com/infinum/eightshift-frontend-libs-tailwind/compare/1.3.1...1.3.2
46
54
  [1.3.1]: https://github.com/infinum/eightshift-frontend-libs-tailwind/compare/1.3.0...1.3.1
47
55
  [1.3.0]: https://github.com/infinum/eightshift-frontend-libs-tailwind/compare/1.2.0...1.3.0
48
56
  [1.2.0]: https://github.com/infinum/eightshift-frontend-libs-tailwind/compare/1.1.1...1.2.0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eightshift/frontend-libs-tailwind",
3
- "version": "1.3.1",
3
+ "version": "1.3.3",
4
4
  "description": "A framework for creating modern Gutenberg themes with styling provided by Tailwind CSS.",
5
5
  "author": {
6
6
  "name": "Eightshift team",
@@ -227,13 +227,13 @@
227
227
  "[a-zA-Z]": {
228
228
  "anyOf": [
229
229
  {
230
- "type": "string",
230
+ "type": ["string", "number", "boolean"],
231
231
  "minLength": 1
232
232
  },
233
233
  {
234
234
  "type": "array",
235
235
  "items": {
236
- "type": "string",
236
+ "type": ["string", "number", "boolean"],
237
237
  "minLength": 1
238
238
  }
239
239
  }
@@ -165,13 +165,13 @@
165
165
  "[a-zA-Z]": {
166
166
  "anyOf": [
167
167
  {
168
- "type": "string",
168
+ "type": ["string", "number", "boolean"],
169
169
  "minLength": 1
170
170
  },
171
171
  {
172
172
  "type": "array",
173
173
  "items": {
174
- "type": "string",
174
+ "type": ["string", "number", "boolean"],
175
175
  "minLength": 1
176
176
  }
177
177
  }
@@ -9,7 +9,7 @@ export const useThemeOptions = (settingName) => {
9
9
 
10
10
  useEffect(() => {
11
11
  apiFetch({ path: '/wp/v2/settings' }).then((settings) => {
12
- setSettings(settings?.[settingName]);
12
+ setSettings(JSON.parse(settings?.[settingName]));
13
13
  });
14
14
  }, []);
15
15
 
@@ -21,7 +21,7 @@ export const useThemeOptions = (settingName) => {
21
21
  path: '/wp/v2/settings',
22
22
  method: 'POST',
23
23
  data: {
24
- [settingName]: settings,
24
+ [settingName]: JSON.stringify(settings),
25
25
  },
26
26
  });
27
27
 
@@ -302,7 +302,6 @@ export const props = (newName, attributes, manual = {}) => {
302
302
  return output;
303
303
  };
304
304
 
305
-
306
305
  /**
307
306
  * Filter attributes by array of keys. Used to provide alternative attributes to server side render component to prevent unnecessary rerender.
308
307
  *