@jetthai/cuora 1.1.38 → 1.1.40

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
@@ -2,6 +2,10 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [1.1.40](https://github.com/jetthai/cuora-module/compare/v1.1.34-2...v1.1.40) (2023-01-16)
6
+
7
+ ### [1.1.39](https://github.com/jetthai/cuora-module/compare/v1.1.38...v1.1.39) (2023-01-16)
8
+
5
9
  ### [1.1.38](https://github.com/jetthai/cuora-module/compare/v1.1.37...v1.1.38) (2023-01-13)
6
10
 
7
11
  ### [1.1.37](https://github.com/jetthai/cuora-module/compare/v1.1.36...v1.1.37) (2023-01-13)
@@ -10,6 +14,20 @@ All notable changes to this project will be documented in this file. See [standa
10
14
 
11
15
  ### [1.1.35](https://github.com/jetthai/cuora-module/compare/v1.1.34...v1.1.35) (2023-01-12)
12
16
 
17
+ ### [1.1.39](https://github.com/jetthai/cuora-module/compare/v1.1.38...v1.1.39) (2023-01-16)
18
+
19
+ ### [1.1.38](https://github.com/jetthai/cuora-module/compare/v1.1.37...v1.1.38) (2023-01-13)
20
+
21
+ ### [1.1.37](https://github.com/jetthai/cuora-module/compare/v1.1.36...v1.1.37) (2023-01-13)
22
+
23
+ ### [1.1.36](https://github.com/jetthai/cuora-module/compare/v1.1.35...v1.1.36) (2023-01-12)
24
+
25
+ ### [1.1.35](https://github.com/jetthai/cuora-module/compare/v1.1.34...v1.1.35) (2023-01-12)
26
+
27
+ ### [1.1.34-2](https://github.com/jetthai/cuora-module/compare/v1.1.34-1...v1.1.34-2) (2023-01-16)
28
+
29
+ ### [1.1.34-1](https://github.com/jetthai/cuora-module/compare/v1.1.34...v1.1.34-1) (2023-01-16)
30
+
13
31
  ### [1.1.34](https://github.com/jetthai/cuora-module/compare/v1.1.32...v1.1.34) (2023-01-10)
14
32
 
15
33
  ### [1.1.33](https://github.com/jetthai/cuora-module/compare/v1.1.32...v1.1.33) (2023-01-10)
package/dist/bundle.mjs CHANGED
@@ -13209,6 +13209,8 @@ function setting () {
13209
13209
  id: 'setting',
13210
13210
  initial: 'idle',
13211
13211
  context: {
13212
+ musicPlay: true,
13213
+ soundPlay: true,
13212
13214
  sound: false,
13213
13215
  music: false,
13214
13216
  locale: 'en-US',
@@ -13225,8 +13227,9 @@ function setting () {
13225
13227
  },
13226
13228
  {
13227
13229
  actions: {
13228
- fetchSetting: assign(() => {
13229
- const setting = JSON.parse(localStorage.getItem('setting')) || { sound: true, music: true };
13230
+ fetchSetting: assign((context, event) => {
13231
+ const { musicPlay, soundPlay } = context;
13232
+ const setting = JSON.parse(localStorage.getItem('setting')) || { sound: soundPlay, music: musicPlay };
13230
13233
  return { ...setting }
13231
13234
  }),
13232
13235
  saveSetting: assign((context, event) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetthai/cuora",
3
- "version": "1.1.38",
3
+ "version": "1.1.40",
4
4
  "description": "",
5
5
  "main": "./src/index.js",
6
6
  "type": "module",
@@ -6,6 +6,8 @@ export default function () {
6
6
  id: 'setting',
7
7
  initial: 'idle',
8
8
  context: {
9
+ musicPlay: true,
10
+ soundPlay: true,
9
11
  sound: false,
10
12
  music: false,
11
13
  locale: 'en-US',
@@ -22,8 +24,9 @@ export default function () {
22
24
  },
23
25
  {
24
26
  actions: {
25
- fetchSetting: assign(() => {
26
- const setting = JSON.parse(localStorage.getItem('setting')) || { sound: true, music: true }
27
+ fetchSetting: assign((context, event) => {
28
+ const { musicPlay, soundPlay } = context
29
+ const setting = JSON.parse(localStorage.getItem('setting')) || { sound: soundPlay, music: musicPlay }
27
30
  return { ...setting }
28
31
  }),
29
32
  saveSetting: assign((context, event) => {