@eightshift/frontend-libs-tailwind 1.3.1 → 1.3.2

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,9 @@ 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.2] - 2024-09-19
8
+ - Fixing theme options to use stringified JSON instead of an object.
9
+
7
10
  ## [1.3.1] - 2024-09-13
8
11
  - Helper `getFilteredAttributes` used on SSR components to filter out unwanted attributes and optimize the output.
9
12
 
@@ -43,6 +46,7 @@ This projects adheres to [Semantic Versioning](https://semver.org/) and [Keep a
43
46
 
44
47
  [Unreleased]: https://github.com/infinum/eightshift-frontend-libs-tailwind/compare/master...HEAD
45
48
 
49
+ [1.3.2]: https://github.com/infinum/eightshift-frontend-libs-tailwind/compare/1.3.1...1.3.2
46
50
  [1.3.1]: https://github.com/infinum/eightshift-frontend-libs-tailwind/compare/1.3.0...1.3.1
47
51
  [1.3.0]: https://github.com/infinum/eightshift-frontend-libs-tailwind/compare/1.2.0...1.3.0
48
52
  [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.2",
4
4
  "description": "A framework for creating modern Gutenberg themes with styling provided by Tailwind CSS.",
5
5
  "author": {
6
6
  "name": "Eightshift team",
@@ -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
  *